From 53cb4fa78df7e105c464ff9a186b385291a5cf60 Mon Sep 17 00:00:00 2001 From: George FunBook Date: Fri, 4 Feb 2022 10:58:24 -0600 Subject: [PATCH] fix crash on week 1 --- source/PlayState.hx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/PlayState.hx b/source/PlayState.hx index 6824a0507..99a87eab9 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -3118,10 +3118,13 @@ class PlayState extends MusicBeatState iconP1.updateHitbox(); iconP2.updateHitbox(); + var song = SongLoad.getSong(); + var step = Math.floor(curStep / 16); if (curBeat % 8 == 7 - && SongLoad.getSong()[Math.floor(curStep / 16)].mustHitSection + && song[step].mustHitSection && combo > 5 - && !SongLoad.getSong()[Math.floor(curStep / 16) + 1].mustHitSection) + && song.length > step + 1// GK: this fixes an error on week 1 where song[step + 1] was null + && !song[step + 1].mustHitSection) { var animShit:ComboCounter = new ComboCounter(-100, 300, combo); animShit.scrollFactor.set(0.6, 0.6);