Skip to content

Commit e4b231c

Browse files
committed
Move offset timer definition
Turns out the array doesn't help if you're still referencing the same timer elsewhere...
1 parent cfead60 commit e4b231c

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

source/funkin/play/Countdown.hx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,6 @@ class Countdown
6767
// Handle onBeatHit events manually
6868
// @:privateAccess
6969
// PlayState.instance.dispatchEvent(new SongTimeScriptEvent(SONG_BEAT_HIT, 0, 0));
70-
var offsetTimer:FlxTimer = null;
71-
if (Conductor.instance.globalOffset != 0)
72-
{
73-
offsetTimer = new FlxTimer();
74-
countdownOffsetTimers.push(offsetTimer);
75-
}
7670

7771
// The timer function gets called based on the beat of the song.
7872
countdownTimer = new FlxTimer();
@@ -85,6 +79,13 @@ class Countdown
8579
return;
8680
}
8781

82+
var offsetTimer:FlxTimer = null;
83+
if (Conductor.instance.globalOffset != 0)
84+
{
85+
offsetTimer = new FlxTimer();
86+
countdownOffsetTimers.push(offsetTimer);
87+
}
88+
8889
countdownStep = decrement(countdownStep);
8990

9091
// onBeatHit events are now properly dispatched by the Conductor even at negative timestamps,

0 commit comments

Comments
 (0)