From b54c335886823e9e3c08ecdfab10452b5e9f1ede Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Wed, 2 Aug 2023 11:00:23 -0400 Subject: [PATCH] Fix for Menu->Freeplay and Play->Pause transitions --- source/funkin/MainMenuState.hx | 4 ++++ source/funkin/play/PlayState.hx | 3 +++ 2 files changed, 7 insertions(+) diff --git a/source/funkin/MainMenuState.hx b/source/funkin/MainMenuState.hx index bca20980c..fc493ef4b 100644 --- a/source/funkin/MainMenuState.hx +++ b/source/funkin/MainMenuState.hx @@ -1,5 +1,6 @@ package funkin; +import flixel.addons.transition.FlxTransitionableSubState; import funkin.ui.debug.DebugMenuSubState; import flixel.FlxObject; import flixel.FlxSprite; @@ -102,6 +103,9 @@ class MainMenuState extends MusicBeatState createMenuItem('freeplay', 'mainmenu/freeplay', function() { persistentDraw = true; persistentUpdate = false; + // Freeplay has its own custom transition + FlxTransitionableSubState.skipNextTransIn = true; + FlxTransitionableSubState.skipNextTransOut = true; openSubState(new FreeplayState()); }); diff --git a/source/funkin/play/PlayState.hx b/source/funkin/play/PlayState.hx index 1674eec25..4d4cf3d40 100644 --- a/source/funkin/play/PlayState.hx +++ b/source/funkin/play/PlayState.hx @@ -1,5 +1,6 @@ package funkin.play; +import flixel.addons.transition.FlxTransitionableSubState; import funkin.ui.debug.charting.ChartEditorState; import haxe.Int64; import funkin.play.notes.notestyle.NoteStyle; @@ -780,6 +781,8 @@ class PlayState extends MusicBeatSubState var pauseSubState:FlxSubState = new PauseSubState(isChartingMode); + FlxTransitionableSubState.skipNextTransIn = true; + FlxTransitionableSubState.skipNextTransOut = true; openSubState(pauseSubState); pauseSubState.camera = camHUD; // boyfriendPos.put(); // TODO: Why is this here?