Skip to content

Commit

Permalink
fix crashing on tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
Kade-github committed Aug 4, 2021
1 parent cd32686 commit bbd8599
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit bbd8599

Please sign in to comment.