From cee373aea8ec062c631ed015fceb828735919766 Mon Sep 17 00:00:00 2001 From: Evil Eye Date: Sun, 20 Oct 2024 10:50:18 +0200 Subject: [PATCH] Don't trigger onStateChanged until the game is in a running state --- apps/openmw/mwlua/luamanagerimp.cpp | 1 - apps/openmw/mwstate/statemanagerimp.cpp | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/openmw/mwlua/luamanagerimp.cpp b/apps/openmw/mwlua/luamanagerimp.cpp index 144ceb234d..780ddaf9a9 100644 --- a/apps/openmw/mwlua/luamanagerimp.cpp +++ b/apps/openmw/mwlua/luamanagerimp.cpp @@ -373,7 +373,6 @@ namespace MWLua mGlobalScripts.addAutoStartedScripts(); mGlobalScriptsStarted = true; mNewGameStarted = true; - mMenuScripts.stateChanged(); } void LuaManager::gameLoaded() diff --git a/apps/openmw/mwstate/statemanagerimp.cpp b/apps/openmw/mwstate/statemanagerimp.cpp index d9ac2bc654..9e292a3eee 100644 --- a/apps/openmw/mwstate/statemanagerimp.cpp +++ b/apps/openmw/mwstate/statemanagerimp.cpp @@ -178,6 +178,7 @@ void MWState::StateManager::newGame(bool bypass) MWBase::Environment::get().getWorld()->startNewGame(bypass); mState = State_Running; + MWBase::Environment::get().getLuaManager()->gameLoaded(); MWBase::Environment::get().getWindowManager()->fadeScreenOut(0); MWBase::Environment::get().getWindowManager()->fadeScreenIn(1);