Fix onNoteHoldDrop logic
Co-Authored-By: Lasercar <64717068+Lasercar@users.noreply.github.com>
This commit is contained in:
committed by
Mihai Alexandru
parent
ce83e962bf
commit
1df0cb95f6
@@ -2712,12 +2712,18 @@ class PlayState extends MusicBeatSubState
|
||||
var event:HoldNoteScriptEvent = new HoldNoteScriptEvent(NOTE_HOLD_DROP, holdNote, healthChange, scoreChange, true, Highscore.tallies.combo);
|
||||
dispatchEvent(event);
|
||||
|
||||
// Calling event.cancelEvent() skips all the other logic! Neat!
|
||||
if (event.eventCanceled) continue;
|
||||
|
||||
trace('Penalizing score by ${event.score} and health by ${event.healthChange} for dropping hold note (is combo break: ${event.isComboBreak})!');
|
||||
applyScore(event.score, '', event.healthChange, event.isComboBreak);
|
||||
|
||||
// Play the miss sound.
|
||||
if (vocals != null) vocals.playerVolume = 0;
|
||||
if (event.playSound)
|
||||
{
|
||||
if (vocals != null) vocals.playerVolume = 0;
|
||||
FunkinSound.playOnce(Paths.soundRandom('missnote', 1, 3), FlxG.random.float(0.5, 0.6));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2925,7 +2931,6 @@ class PlayState extends MusicBeatSubState
|
||||
if (pressArray[i]) indices.push(i);
|
||||
}
|
||||
}
|
||||
if (vocals != null) vocals.playerVolume = 0;
|
||||
|
||||
applyScore(Scoring.getMissScore(), 'miss', healthChange, true);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user