diff options
-rw-r--r-- | src/ai/ai_gui.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ai/ai_gui.cpp b/src/ai/ai_gui.cpp index e1abe49e5..6f591038d 100644 --- a/src/ai/ai_gui.cpp +++ b/src/ai/ai_gui.cpp @@ -1072,6 +1072,14 @@ struct AIDebugWindow : public QueryStringBaseWindow { break; } } + + /* If no AI is available, see if there is a game script. */ + if (ai_debug_company == INVALID_COMPANY && Game::GetInstance() != NULL) { + /* Lower the widget corresponding to the game script. */ + this->LowerWidget(WID_AID_SCRIPT_GAME); + + ai_debug_company = OWNER_DEITY; + } } /* Update "Reload AI" and "AI settings" buttons */ |