Skip to content

Commit

Permalink
Merge pull request #669 from FunkinCrew/gamerbross/pause-sticker-zoom
Browse files Browse the repository at this point in the history
[PUBLIC PR] Fix a bug where pausing during a camera zoom would break the HUD funk-612
  • Loading branch information
ninjamuffin99 authored Jul 18, 2024
2 parents e26a99d + b6a8b62 commit 8d9071d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 2 additions & 3 deletions source/funkin/play/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ class PlayState extends MusicBeatSubState
public var camGame:FlxCamera;

/**
* The camera which contains, and controls visibility of, a video cutscene.
* The camera which contains, and controls visibility of, a video cutscene, dialogue, pause menu and sticker transition.
*/
public var camCutscene:FlxCamera;

Expand Down Expand Up @@ -975,7 +975,7 @@ class PlayState extends MusicBeatSubState

FlxTransitionableState.skipNextTransIn = true;
FlxTransitionableState.skipNextTransOut = true;
pauseSubState.camera = camHUD;
pauseSubState.camera = camCutscene;
openSubState(pauseSubState);
// boyfriendPos.put(); // TODO: Why is this here?
}
Expand Down Expand Up @@ -1934,7 +1934,6 @@ class PlayState extends MusicBeatSubState
if (!result) return;

isInCutscene = false;
camCutscene.visible = false;

// TODO: Maybe tween in the camera after any cutscenes.
camHUD.visible = true;
Expand Down
2 changes: 0 additions & 2 deletions source/funkin/play/cutscene/VideoCutscene.hx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ class VideoCutscene
// Trigger the cutscene. Don't play the song in the background.
PlayState.instance.isInCutscene = true;
PlayState.instance.camHUD.visible = false;
PlayState.instance.camCutscene.visible = true;

// Display a black screen to hide the game while the video is playing.
blackScreen = new FlxSprite(-200, -200).makeGraphic(FlxG.width * 2, FlxG.height * 2, FlxColor.BLACK);
Expand Down Expand Up @@ -305,7 +304,6 @@ class VideoCutscene
vid = null;
#end

PlayState.instance.camCutscene.visible = true;
PlayState.instance.camHUD.visible = true;

FlxTween.tween(blackScreen, {alpha: 0}, transitionTime,
Expand Down

0 comments on commit 8d9071d

Please sign in to comment.