Allow introLength = 0
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user