diff --git a/source/funkin/ui/freeplay/FreeplayState.hx b/source/funkin/ui/freeplay/FreeplayState.hx index 860b8f235..e5f89ed0d 100644 --- a/source/funkin/ui/freeplay/FreeplayState.hx +++ b/source/funkin/ui/freeplay/FreeplayState.hx @@ -946,16 +946,16 @@ class FreeplayState extends MusicBeatSubState caps.doJumpOut = true; } - if (Type.getClass(FlxG.state) == MainMenuState) + if (Type.getClass(_parentState) == MainMenuState) { - FlxG.state.persistentUpdate = false; - FlxG.state.persistentDraw = true; + _parentState.persistentUpdate = false; + _parentState.persistentDraw = true; } new FlxTimer().start(longestTimer, (_) -> { FlxTransitionableState.skipNextTransIn = true; FlxTransitionableState.skipNextTransOut = true; - if (Type.getClass(FlxG.state) == MainMenuState) + if (Type.getClass(_parentState) == MainMenuState) { FunkinSound.playMusic('freakyMenu', { diff --git a/source/funkin/ui/mainmenu/MainMenuState.hx b/source/funkin/ui/mainmenu/MainMenuState.hx index 27082c94d..27170fd49 100644 --- a/source/funkin/ui/mainmenu/MainMenuState.hx +++ b/source/funkin/ui/mainmenu/MainMenuState.hx @@ -54,8 +54,9 @@ class MainMenuState extends MusicBeatState playMenuMusic(); - persistentUpdate = true; - persistentDraw = true; + // If something else overrides these, we should keep those values. + // persistentUpdate = true; + // persistentDraw = true; var bg:FlxSprite = new FlxSprite(Paths.image('menuBG')); bg.scrollFactor.x = 0;