# HG changeset patch # User Loïc Guilloux # Date 2024-02-20 16:08:26 # Node ID 1f0e3e5e39e076791480653fdb97b3d349ba612e # Parent df6178d3a5a528aef19eac7dfa67009fd57b5eef Fix: [Script] Only show debug script window at the end of savegame loading (#12135) diff --git a/src/ai/ai_instance.cpp b/src/ai/ai_instance.cpp --- a/src/ai/ai_instance.cpp +++ b/src/ai/ai_instance.cpp @@ -64,6 +64,9 @@ void AIInstance::Died() /* Intro is not supposed to use AI, but it may have 'dummy' AI which instant dies. */ if (_game_mode == GM_MENU) return; + /* Don't show errors while loading savegame. They will be shown at end of loading anyway. */ + if (_switch_mode != SM_NONE) return; + ShowScriptDebugWindow(_current_company); const AIInfo *info = AIConfig::GetConfig(_current_company)->GetInfo(); diff --git a/src/game/game_instance.cpp b/src/game/game_instance.cpp --- a/src/game/game_instance.cpp +++ b/src/game/game_instance.cpp @@ -67,6 +67,9 @@ void GameInstance::Died() { ScriptInstance::Died(); + /* Don't show errors while loading savegame. They will be shown at end of loading anyway. */ + if (_switch_mode != SM_NONE) return; + ShowScriptDebugWindow(OWNER_DEITY); const GameInfo *info = Game::GetInfo();