From bbd8599c4675b9f2581c31bba31da411ff6ae70b Mon Sep 17 00:00:00 2001 From: KadeDeveloper Date: Wed, 4 Aug 2021 15:07:26 -0700 Subject: [PATCH] fix crashing on tutorial --- source/PlayState.hx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/PlayState.hx b/source/PlayState.hx index 331c468..4f1237c 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -3232,6 +3232,7 @@ class PlayState extends MusicBeatState function endSong():Void { + endingSong = true; FlxG.stage.removeEventListener(KeyboardEvent.KEY_DOWN, handleInput); FlxG.stage.removeEventListener(KeyboardEvent.KEY_UP, releaseInput); if (useVideo) @@ -4442,7 +4443,7 @@ class PlayState extends MusicBeatState } #end - if (curSong == 'Tutorial' && dad.curCharacter == 'gf') + if (curSong == 'Tutorial' && dad.curCharacter == 'gf' && SONG.notes[Math.floor(curStep / 16)] != null) { if (SONG.notes[Math.floor(curStep / 16)].mustHitSection) dad.dance();