Skip to content

Commit 56ddb07

Browse files
committed
force pause substate onto camOther
1 parent 316d583 commit 56ddb07

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

source/funkin/states/CutscenePauseSubstate.hx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@ class CutscenePauseSubstate extends MusicBeatSubstate {
3232
}
3333

3434
override function create(){
35-
var cam:FlxCamera = FlxG.cameras.list[FlxG.cameras.list.length - 1];
36-
this.cameras = [cam];
35+
if (_cameras == null || _cameras.length == 0)
36+
camera = FlxG.cameras.list[FlxG.cameras.list.length - 1];
37+
3738
prevTimeScale = FlxG.timeScale;
3839
FlxG.timeScale = 1;
3940

source/funkin/states/PauseSubState.hx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ class PauseSubState extends MusicBeatSubstate
144144
FlxG.mouse.visible = false;
145145
persistentUpdate = false;
146146

147-
var cam:FlxCamera = FlxG.cameras.list[FlxG.cameras.list.length - 1];
148-
this.cameras = [cam];
147+
if (_cameras == null || _cameras.length == 0)
148+
camera = FlxG.cameras.list[FlxG.cameras.list.length - 1];
149149

150150
@:privateAccess
151151
_bgSprite._cameras = this._cameras;

source/funkin/states/PlayState.hx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,8 @@ class PlayState extends MusicBeatState
653653

654654
FlxG.cameras.setDefaultDrawTarget(camGame, true);
655655

656+
this.camera = camGame;
657+
656658
camFollow = prevCamFollow ?? new FlxPoint();
657659
camFollowPos = prevCamFollowPos ?? new FlxObject();
658660

@@ -3793,7 +3795,10 @@ class PlayState extends MusicBeatState
37933795
persistentUpdate = false;
37943796
persistentDraw = true;
37953797
scene.pause();
3796-
openSubState(new CutscenePauseSubstate(scene));
3798+
3799+
var substate = new CutscenePauseSubstate(scene);
3800+
substate.camera = camOther;
3801+
openSubState(substate);
37973802
}
37983803

37993804
public function openPauseMenu()
@@ -3805,7 +3810,10 @@ class PlayState extends MusicBeatState
38053810
pause();
38063811
persistentUpdate = false;
38073812
persistentDraw = true;
3808-
openSubState(new PauseSubState());
3813+
3814+
var substate = new PauseSubState();
3815+
substate.camera = camOther;
3816+
openSubState(substate);
38093817
}
38103818

38113819
public function doPauseShit()

0 commit comments

Comments
 (0)