mirror of https://github.com/OpenTTD/OpenTTD.git
Fix: [Script] Only show debug script window at the end of savegame loading (#12135)
This commit is contained in:
parent
f1bf39f38b
commit
2d7ad9f717
|
@ -64,6 +64,9 @@ void AIInstance::Died()
|
||||||
/* Intro is not supposed to use AI, but it may have 'dummy' AI which instant dies. */
|
/* Intro is not supposed to use AI, but it may have 'dummy' AI which instant dies. */
|
||||||
if (_game_mode == GM_MENU) return;
|
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);
|
ShowScriptDebugWindow(_current_company);
|
||||||
|
|
||||||
const AIInfo *info = AIConfig::GetConfig(_current_company)->GetInfo();
|
const AIInfo *info = AIConfig::GetConfig(_current_company)->GetInfo();
|
||||||
|
|
|
@ -67,6 +67,9 @@ void GameInstance::Died()
|
||||||
{
|
{
|
||||||
ScriptInstance::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);
|
ShowScriptDebugWindow(OWNER_DEITY);
|
||||||
|
|
||||||
const GameInfo *info = Game::GetInfo();
|
const GameInfo *info = Game::GetInfo();
|
||||||
|
|
Loading…
Reference in New Issue