1
0
Fork 0

Fix: [Script] Only show debug script window at the end of savegame loading (#12135)

pull/12277/head
Loïc Guilloux 2024-02-20 17:08:26 +01:00 committed by Kuhnovic
parent af5c38469e
commit 1d55af92e4
2 changed files with 6 additions and 0 deletions

View File

@ -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();

View File

@ -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();