Skip to content

Commit 620650b

Browse files
committed
Allow introLength = 0
1 parent 2c52720 commit 620650b

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

source/funkin/game/PlayState.hx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -865,12 +865,12 @@ class PlayState extends MusicBeatState
865865
Conductor.songPosition = 0;
866866
Conductor.songPosition -= Conductor.crochet * introLength - Conductor.songOffset;
867867

868-
var swagCounter:Int = 0;
869-
870-
startTimer = new FlxTimer().start(Conductor.crochet / 1000, function(tmr:FlxTimer)
871-
{
872-
countdown(swagCounter++);
873-
}, introLength);
868+
if(introLength > 0) {
869+
var swagCounter:Int = 0;
870+
startTimer = new FlxTimer().start(Conductor.crochet / 1000, (tmr:FlxTimer) -> {
871+
countdown(swagCounter++);
872+
}, introLength);
873+
}
874874
scripts.call("onPostStartCountdown");
875875
}
876876

@@ -1047,7 +1047,7 @@ class PlayState extends MusicBeatState
10471047
vocals.pause();
10481048
}
10491049

1050-
if (!startTimer.finished)
1050+
if (startTimer != null && !startTimer.finished)
10511051
startTimer.active = false;
10521052
}
10531053

@@ -1067,7 +1067,7 @@ class PlayState extends MusicBeatState
10671067
resyncVocals();
10681068
}
10691069

1070-
if (!startTimer.finished)
1070+
if (startTimer != null && !startTimer.finished)
10711071
startTimer.active = true;
10721072
paused = false;
10731073

source/funkin/game/StrumLine.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ class StrumLine extends FlxTypedGroup<Strum> {
309309
babyArrow.scrollSpeed = data.scrollSpeed;
310310

311311
var event = EventManager.get(StrumCreationEvent).recycle(babyArrow, PlayState.instance.strumLines.members.indexOf(this), i, animPrefix);
312-
event.__doAnimation = !MusicBeatState.skipTransIn;
312+
event.__doAnimation = !MusicBeatState.skipTransIn && (PlayState.instance != null ? PlayState.instance.introLength > 0 : true);
313313
event = PlayState.instance.scripts.event("onStrumCreation", event);
314314

315315
if (!event.cancelled) {

0 commit comments

Comments
 (0)