mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-12-23 21:56:46 +00:00
Fix ChartingState GameOver Crashes
This commit is contained in:
parent
28bee8397e
commit
f1a0692c51
|
@ -162,6 +162,8 @@ class GameOverSubState extends MusicBeatSubState
|
|||
@:nullSafety(Off)
|
||||
function setCameraTarget():Void
|
||||
{
|
||||
if (PlayState.instance.isMinimalMode || boyfriend == null) return;
|
||||
|
||||
// Assign a camera follow point to the boyfriend's position.
|
||||
cameraFollowPoint = new FlxObject(PlayState.instance.cameraFollowPoint.x, PlayState.instance.cameraFollowPoint.y, 1, 1);
|
||||
cameraFollowPoint.x = boyfriend.getGraphicMidpoint().x;
|
||||
|
@ -254,6 +256,7 @@ class GameOverSubState extends MusicBeatSubState
|
|||
this.close();
|
||||
if (FlxG.sound.music != null) FlxG.sound.music.pause(); // Don't reset song position!
|
||||
PlayState.instance.close(); // This only works because PlayState is a substate!
|
||||
return;
|
||||
}
|
||||
else if (PlayStatePlaylist.isStoryMode)
|
||||
{
|
||||
|
|
|
@ -1092,8 +1092,11 @@ class PlayState extends MusicBeatSubState
|
|||
|
||||
healthBar.value = healthLerp;
|
||||
|
||||
iconP1.updatePosition();
|
||||
iconP2.updatePosition();
|
||||
if (!isMinimalMode)
|
||||
{
|
||||
iconP1.updatePosition();
|
||||
iconP2.updatePosition();
|
||||
}
|
||||
|
||||
// Transition to the game over substate.
|
||||
var gameOverSubState = new GameOverSubState(
|
||||
|
|
Loading…
Reference in a new issue