fixed bugs where game would crash if pressing R during cutscene or state transition

This commit is contained in:
MtH 2021-03-30 18:43:07 +02:00
parent 720ae5d3cc
commit 0370f77dfe

View file

@ -941,7 +941,7 @@ class PlayState extends MusicBeatState
}); });
} }
var startTimer:FlxTimer; var startTimer:FlxTimer = new FlxTimer();
var perfectMode:Bool = false; var perfectMode:Bool = false;
function startCountdown():Void function startCountdown():Void
@ -958,7 +958,7 @@ class PlayState extends MusicBeatState
var swagCounter:Int = 0; var swagCounter:Int = 0;
startTimer = new FlxTimer().start(Conductor.crochet / 1000, function(tmr:FlxTimer) startTimer.start(Conductor.crochet / 1000, function(tmr:FlxTimer)
{ {
// this just based on beatHit stuff but compact // this just based on beatHit stuff but compact
if (swagCounter % gfSpeed == 0) if (swagCounter % gfSpeed == 0)
@ -1563,6 +1563,8 @@ class PlayState extends MusicBeatState
} }
// better streaming of shit // better streaming of shit
if (!inCutscene && !_exiting)
{
// RESET = Quick Game Over Screen // RESET = Quick Game Over Screen
if (controls.RESET) if (controls.RESET)
{ {
@ -1600,6 +1602,7 @@ class PlayState extends MusicBeatState
DiscordClient.changePresence("Game Over - " + detailsText, SONG.song + " (" + storyDifficultyText + ")", iconRPC); DiscordClient.changePresence("Game Over - " + detailsText, SONG.song + " (" + storyDifficultyText + ")", iconRPC);
#end #end
} }
}
if (unspawnNotes[0] != null) if (unspawnNotes[0] != null)
{ {