From 3810662f9fd55400be6d96808256b3c5e94be4ab Mon Sep 17 00:00:00 2001 From: rich <87835336+richTrash21@users.noreply.github.com> Date: Tue, 14 May 2024 04:20:23 +0400 Subject: [PATCH] freeplay optimization --- source/funkin/ui/freeplay/FreeplayState.hx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/funkin/ui/freeplay/FreeplayState.hx b/source/funkin/ui/freeplay/FreeplayState.hx index 7b7543845..bdaa87ede 100644 --- a/source/funkin/ui/freeplay/FreeplayState.hx +++ b/source/funkin/ui/freeplay/FreeplayState.hx @@ -527,6 +527,9 @@ class FreeplayState extends MusicBeatSubState orangeBackShit.visible = true; alsoOrangeLOL.visible = true; grpTxtScrolls.visible = true; + + // render optimisation + _parentState.persistentDraw = false; }); generateSongList(null, false); @@ -985,6 +988,8 @@ class FreeplayState extends MusicBeatSubState { clearDaCache(daSong.songName); } + // remove and destroy freeplay camera + FlxG.cameras.remove(FlxG.cameras.list[FlxG.cameras.list.length - 1]); } function changeDiff(change:Int = 0, force:Bool = false):Void