From e49b0653e351f869d4b3b9a982b156bc6321573e Mon Sep 17 00:00:00 2001 From: Frakist <90983918+Frakist@users.noreply.github.com> Date: Sat, 14 Oct 2023 08:48:43 +0300 Subject: [PATCH] oops #2 --- source/funkin/backend/MusicBeatState.hx | 6 +++--- source/funkin/backend/MusicBeatSubstate.hx | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/source/funkin/backend/MusicBeatState.hx b/source/funkin/backend/MusicBeatState.hx index b0a9980e..88309c82 100644 --- a/source/funkin/backend/MusicBeatState.hx +++ b/source/funkin/backend/MusicBeatState.hx @@ -113,10 +113,10 @@ class MusicBeatState extends FlxState implements IBeatReceiver } function loadScript() { + var className = Type.getClassName(Type.getClass(this)); + if (stateScripts == null) + (stateScripts = new ScriptPack(className)).setParent(this); if (scriptsAllowed) { - var className = Type.getClassName(Type.getClass(this)); - if (stateScripts == null) - (stateScripts = new ScriptPack(className)).setParent(this); if (stateScripts.scripts.length == 0) { var scriptName = this.scriptName != null ? this.scriptName : className.substr(className.lastIndexOf(".")+1); for (i in funkin.backend.assets.ModsFolder.getLoadedMods()) { diff --git a/source/funkin/backend/MusicBeatSubstate.hx b/source/funkin/backend/MusicBeatSubstate.hx index b7987f7d..5db43fce 100644 --- a/source/funkin/backend/MusicBeatSubstate.hx +++ b/source/funkin/backend/MusicBeatSubstate.hx @@ -100,10 +100,10 @@ class MusicBeatSubstate extends FlxSubState implements IBeatReceiver } function loadScript() { + var className = Type.getClassName(Type.getClass(this)); + if (stateScripts == null) + (stateScripts = new ScriptPack(className)).setParent(this); if (scriptsAllowed) { - var className = Type.getClassName(Type.getClass(this)); - if (stateScripts == null) - (stateScripts = new ScriptPack(className)).setParent(this); if (stateScripts.scripts.length == 0) { var scriptName = this.scriptName != null ? this.scriptName : className.substr(className.lastIndexOf(".")+1); for (i in funkin.backend.assets.ModsFolder.getLoadedMods()) {