From 1c352e4e114ed997f842d638ad0483b5a5554cae Mon Sep 17 00:00:00 2001 From: richTrash21 Date: Thu, 23 May 2024 21:50:11 +0400 Subject: [PATCH] simplify freeplay camera --- source/funkin/ui/freeplay/FreeplayState.hx | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/source/funkin/ui/freeplay/FreeplayState.hx b/source/funkin/ui/freeplay/FreeplayState.hx index 2f8231bb0..2dea92352 100644 --- a/source/funkin/ui/freeplay/FreeplayState.hx +++ b/source/funkin/ui/freeplay/FreeplayState.hx @@ -156,6 +156,12 @@ class FreeplayState extends MusicBeatSubState FlxTransitionableState.skipNextTransIn = true; + // dedicated camera for the state so we don't need to fuk around with camera scrolls from the mainmenu / elsewhere + funnyCam = new FunkinCamera('freeplayFunny', 0, 0, FlxG.width, FlxG.height); + funnyCam.bgColor = FlxColor.TRANSPARENT; + FlxG.cameras.add(funnyCam, false); + this.cameras = [funnyCam]; + if (stickerSubState != null) { this.persistentUpdate = true; @@ -534,15 +540,6 @@ class FreeplayState extends MusicBeatSubState }); generateSongList(null, false); - - // dedicated camera for the state so we don't need to fuk around with camera scrolls from the mainmenu / elsewhere - funnyCam = new FunkinCamera('freeplayFunny', 0, 0, FlxG.width, FlxG.height); - funnyCam.bgColor = FlxColor.TRANSPARENT; - FlxG.cameras.add(funnyCam, false); - - forEach(function(bs) { - bs.cameras = [funnyCam]; - }); } var currentFilter:SongFilter = null;