Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX] ChartingState GameOver Crashes #2518

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions source/funkin/play/GameOverSubState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
{
Expand Down
7 changes: 5 additions & 2 deletions source/funkin/play/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down