1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-11-15 11:22:55 +00:00

Fix a bug where Bot Play could miss (via lag or the player mashing) and lose the song.

This commit is contained in:
EliteMasterEric 2024-08-28 05:47:34 -04:00
parent ccabded2cc
commit 89402f8bb8

View file

@ -2221,10 +2221,14 @@ class PlayState extends MusicBeatSubState
// Calling event.cancelEvent() skips all the other logic! Neat!
if (event.eventCanceled) continue;
// Skip handling the miss in botplay!
if (!isBotPlayMode)
{
// Judge the miss.
// NOTE: This is what handles the scoring.
trace('Missed note! ${note.noteData}');
onNoteMiss(note, event.playSound, event.healthChange);
}
note.handledMiss = true;
}
@ -2321,6 +2325,9 @@ class PlayState extends MusicBeatSubState
playerStrumline.pressKey(input.noteDirection);
// Don't credit or penalize inputs in Bot Play.
if (isBotPlayMode) continue;
var notesInDirection:Array<NoteSprite> = notesByDirection[input.noteDirection];
#if FEATURE_GHOST_TAPPING