1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-12-04 20:53:57 +00:00

Fix an issue where returning to Freeplay from gameplay would let you interact with the menu underneath

This commit is contained in:
EliteMasterEric 2024-04-30 13:58:39 -04:00
parent dae7d71b17
commit e7a09fcee2
2 changed files with 7 additions and 6 deletions

View file

@ -946,16 +946,16 @@ class FreeplayState extends MusicBeatSubState
caps.doJumpOut = true; caps.doJumpOut = true;
} }
if (Type.getClass(FlxG.state) == MainMenuState) if (Type.getClass(_parentState) == MainMenuState)
{ {
FlxG.state.persistentUpdate = false; _parentState.persistentUpdate = false;
FlxG.state.persistentDraw = true; _parentState.persistentDraw = true;
} }
new FlxTimer().start(longestTimer, (_) -> { new FlxTimer().start(longestTimer, (_) -> {
FlxTransitionableState.skipNextTransIn = true; FlxTransitionableState.skipNextTransIn = true;
FlxTransitionableState.skipNextTransOut = true; FlxTransitionableState.skipNextTransOut = true;
if (Type.getClass(FlxG.state) == MainMenuState) if (Type.getClass(_parentState) == MainMenuState)
{ {
FunkinSound.playMusic('freakyMenu', FunkinSound.playMusic('freakyMenu',
{ {

View file

@ -54,8 +54,9 @@ class MainMenuState extends MusicBeatState
playMenuMusic(); playMenuMusic();
persistentUpdate = true; // If something else overrides these, we should keep those values.
persistentDraw = true; // persistentUpdate = true;
// persistentDraw = true;
var bg:FlxSprite = new FlxSprite(Paths.image('menuBG')); var bg:FlxSprite = new FlxSprite(Paths.image('menuBG'));
bg.scrollFactor.x = 0; bg.scrollFactor.x = 0;