mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-11-29 02:04:28 +00:00
Merge branch 'bugfix/play-state-fix' into feature/chart-editor-song-preview
This commit is contained in:
commit
859b543118
|
@ -130,11 +130,11 @@ class GameOverSubState extends MusicBeatSubState
|
|||
|
||||
if (boyfriend.hasAnimation('fakeoutDeath') && FlxG.random.bool((1 / 4096) * 100))
|
||||
{
|
||||
boyfriend.playAnimation('fakeoutDeath', true, true);
|
||||
boyfriend.playAnimation('fakeoutDeath', true, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
boyfriend.playAnimation('firstDeath', true, true);
|
||||
boyfriend.playAnimation('firstDeath', true, false); // ignoreOther is set to FALSE since you WANT to be able to mash and confirm game over!
|
||||
// Play the "blue balled" sound. May play a variant if one has been assigned.
|
||||
playBlueBalledSFX();
|
||||
}
|
||||
|
|
|
@ -321,6 +321,11 @@ class PlayState extends MusicBeatSubState
|
|||
*/
|
||||
var startingSong:Bool = false;
|
||||
|
||||
/**
|
||||
* False until `create()` has completed.
|
||||
*/
|
||||
var initialized:Bool = false;
|
||||
|
||||
/**
|
||||
* A group of audio tracks, used to play the song's vocals.
|
||||
*/
|
||||
|
@ -651,6 +656,8 @@ class PlayState extends MusicBeatSubState
|
|||
|
||||
FlxG.console.registerObject('playState', this);
|
||||
#end
|
||||
|
||||
initialized = true;
|
||||
}
|
||||
|
||||
public override function update(elapsed:Float):Void
|
||||
|
@ -1107,7 +1114,7 @@ class PlayState extends MusicBeatSubState
|
|||
|
||||
override function stepHit():Bool
|
||||
{
|
||||
if (criticalFailure) return false;
|
||||
if (criticalFailure || !initialized) return false;
|
||||
|
||||
// super.stepHit() returns false if a module cancelled the event.
|
||||
if (!super.stepHit()) return false;
|
||||
|
@ -1133,7 +1140,7 @@ class PlayState extends MusicBeatSubState
|
|||
|
||||
override function beatHit():Bool
|
||||
{
|
||||
if (criticalFailure) return false;
|
||||
if (criticalFailure || !initialized) return false;
|
||||
|
||||
// super.beatHit() returns false if a module cancelled the event.
|
||||
if (!super.beatHit()) return false;
|
||||
|
|
Loading…
Reference in a new issue