Allow introLength = 0

This commit is contained in:
Ne_Eo
2024-10-07 00:59:54 +02:00
parent 2c52720244
commit 620650bb81
2 changed files with 9 additions and 9 deletions
+8 -8
View File
@@ -865,12 +865,12 @@ class PlayState extends MusicBeatState
Conductor.songPosition = 0;
Conductor.songPosition -= Conductor.crochet * introLength - Conductor.songOffset;
var swagCounter:Int = 0;
startTimer = new FlxTimer().start(Conductor.crochet / 1000, function(tmr:FlxTimer)
{
countdown(swagCounter++);
}, introLength);
if(introLength > 0) {
var swagCounter:Int = 0;
startTimer = new FlxTimer().start(Conductor.crochet / 1000, (tmr:FlxTimer) -> {
countdown(swagCounter++);
}, introLength);
}
scripts.call("onPostStartCountdown");
}
@@ -1047,7 +1047,7 @@ class PlayState extends MusicBeatState
vocals.pause();
}
if (!startTimer.finished)
if (startTimer != null && !startTimer.finished)
startTimer.active = false;
}
@@ -1067,7 +1067,7 @@ class PlayState extends MusicBeatState
resyncVocals();
}
if (!startTimer.finished)
if (startTimer != null && !startTimer.finished)
startTimer.active = true;
paused = false;
+1 -1
View File
@@ -309,7 +309,7 @@ class StrumLine extends FlxTypedGroup<Strum> {
babyArrow.scrollSpeed = data.scrollSpeed;
var event = EventManager.get(StrumCreationEvent).recycle(babyArrow, PlayState.instance.strumLines.members.indexOf(this), i, animPrefix);
event.__doAnimation = !MusicBeatState.skipTransIn;
event.__doAnimation = !MusicBeatState.skipTransIn && (PlayState.instance != null ? PlayState.instance.introLength > 0 : true);
event = PlayState.instance.scripts.event("onStrumCreation", event);
if (!event.cancelled) {