From 1759f5c3883b572db0050478bfec5ad8b33585ec Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Wed, 3 Apr 2024 04:52:28 -0400 Subject: [PATCH] Note cover now only plays splash on player --- source/funkin/play/PlayState.hx | 4 ++-- source/funkin/play/notes/NoteHoldCover.hx | 7 ------- source/funkin/play/notes/Strumline.hx | 17 ++++++++++++++--- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/source/funkin/play/PlayState.hx b/source/funkin/play/PlayState.hx index 52bfedd8d..e3e1f974d 100644 --- a/source/funkin/play/PlayState.hx +++ b/source/funkin/play/PlayState.hx @@ -2224,8 +2224,8 @@ class PlayState extends MusicBeatSubState holdNote.handledMiss = true; // Mute vocals and play miss animation, but don't penalize. - vocals.playerVolume = 0; - if (currentStage != null && currentStage.getBoyfriend() != null) currentStage.getBoyfriend().playSingAnimation(holdNote.noteData.getDirection(), true); + // vocals.playerVolume = 0; + // if (currentStage != null && currentStage.getBoyfriend() != null) currentStage.getBoyfriend().playSingAnimation(holdNote.noteData.getDirection(), true); } } } diff --git a/source/funkin/play/notes/NoteHoldCover.hx b/source/funkin/play/notes/NoteHoldCover.hx index 52ae97d4f..7bed8a08c 100644 --- a/source/funkin/play/notes/NoteHoldCover.hx +++ b/source/funkin/play/notes/NoteHoldCover.hx @@ -77,13 +77,6 @@ class NoteHoldCover extends FlxTypedSpriteGroup public override function update(elapsed):Void { super.update(elapsed); - if ((!holdNote.alive || holdNote.missedNote) && !glow.animation.curAnim.name.startsWith('holdCoverEnd')) - { - // If alive is false, the hold note was held to completion. - // If missedNote is true, the hold note was "dropped". - - playEnd(); - } } public function playStart():Void diff --git a/source/funkin/play/notes/Strumline.hx b/source/funkin/play/notes/Strumline.hx index 2b10c05ee..2b4e09370 100644 --- a/source/funkin/play/notes/Strumline.hx +++ b/source/funkin/play/notes/Strumline.hx @@ -370,8 +370,6 @@ class Strumline extends FlxSpriteGroup // Hold note is offscreen, kill it. holdNote.visible = false; holdNote.kill(); // Do not destroy! Recycling is faster. - - // The cover will see this and clean itself up. } else if (holdNote.hitNote && holdNote.sustainLength <= 0) { @@ -385,10 +383,16 @@ class Strumline extends FlxSpriteGroup playStatic(holdNote.noteDirection); } - if (holdNote.cover != null) + if (holdNote.cover != null && isPlayer) { holdNote.cover.playEnd(); } + else if (holdNote.cover != null) + { + // *lightning* *zap* *crackle* + holdNote.cover.visible = false; + holdNote.cover.kill(); + } holdNote.visible = false; holdNote.kill(); @@ -410,6 +414,13 @@ class Strumline extends FlxSpriteGroup { holdNote.y = this.y - INITIAL_OFFSET + calculateNoteYPos(holdNote.strumTime, vwoosh) + yOffset + STRUMLINE_SIZE / 2; } + + // Clean up the cover. + if (holdNote.cover != null) + { + holdNote.cover.visible = false; + holdNote.cover.kill(); + } } else if (Conductor.instance.songPosition > holdNote.strumTime && holdNote.hitNote) {