Disabled GC on pause cuz of lag. Fixed FlxCameras.defaultTarget warning

This commit is contained in:
AirDog46 2025-05-19 19:54:17 +03:00
parent 0e56a7336b
commit cfd1099dbc
3 changed files with 7 additions and 9 deletions

View File

@ -60,9 +60,9 @@ class DiffOverview extends FlxSubState
FlxG.cameras.add(camGame); FlxG.cameras.add(camGame);
FlxG.cameras.add(camHUD); FlxG.cameras.add(camHUD, false);
FlxCamera.defaultCameras = [camGame]; //FlxG.cameras.setDefaultDrawTarget(camGame,true);
playerStrums = new FlxTypedGroup<FlxSprite>(); playerStrums = new FlxTypedGroup<FlxSprite>();

View File

@ -33,8 +33,6 @@ class PauseSubState extends MusicBeatSubstate
public function new(x:Float, y:Float) public function new(x:Float, y:Float)
{ {
super(); super();
cpp.vm.Gc.run(true);
trace("Game paused. We can run the garbage collector");
if (PlayState.instance.useVideo) if (PlayState.instance.useVideo)
{ {

View File

@ -401,13 +401,13 @@ class PlayState extends MusicBeatState
camNotes.bgColor.alpha = 0; camNotes.bgColor.alpha = 0;
FlxG.cameras.reset(camGame); FlxG.cameras.reset(camGame);
FlxG.cameras.add(camHUD); FlxG.cameras.add(camHUD, false);
FlxG.cameras.add(camSustains); FlxG.cameras.add(camSustains, false);
FlxG.cameras.add(camNotes); FlxG.cameras.add(camNotes, false);
camHUD.zoom = PlayStateChangeables.zoom; camHUD.zoom = PlayStateChangeables.zoom;
FlxCamera.defaultCameras = [camGame]; //FlxG.cameras.setDefaultDrawTarget(camGame, true);
persistentUpdate = true; persistentUpdate = true;
persistentDraw = true; persistentDraw = true;