From 9246a69a7fa472f1be5059c26611b1ca9a2bf87d Mon Sep 17 00:00:00 2001 From: LarryFrosty Date: Tue, 24 Sep 2024 17:23:44 +0800 Subject: [PATCH] lol --- source/states/PlayState.hx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/states/PlayState.hx b/source/states/PlayState.hx index 7f3e888f..861c04c3 100644 --- a/source/states/PlayState.hx +++ b/source/states/PlayState.hx @@ -3099,6 +3099,12 @@ class PlayState extends MusicBeatState } override function destroy() { + if (psychlua.CustomSubstate.instance != null) + { + closeSubState(); + resetSubState(); + } + #if LUA_ALLOWED for (lua in luaArray) { @@ -3121,12 +3127,6 @@ class PlayState extends MusicBeatState #end stagesFunc(function(stage:BaseStage) stage.destroy()); - if (psychlua.CustomSubstate.instance != null) - { - closeSubState(); - resetSubState(); - } - FlxG.stage.removeEventListener(KeyboardEvent.KEY_DOWN, onKeyPress); FlxG.stage.removeEventListener(KeyboardEvent.KEY_UP, onKeyRelease);