summaryrefslogtreecommitdiff
path: root/src/ai/ai_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-03-11 21:55:37 +0000
committerrubidium <rubidium@openttd.org>2010-03-11 21:55:37 +0000
commite3fb793a8a6d4bab58e68c54736a655e2373b78c (patch)
tree25bb7789784e85249b4500c1a4fd2be62c197116 /src/ai/ai_gui.cpp
parent8b041e8027d4c8bee35731e62e39129b85dd6122 (diff)
downloadopenttd-e3fb793a8a6d4bab58e68c54736a655e2373b78c.tar.xz
(svn r19388) -Fix [FS#3666]: [NoAI] When reloading a savegame, an AI failing to compile could trigger (trying) to read the not yet loaded information of another AI via the AI Debug window and its "open with the most recently used AI" feature
Diffstat (limited to 'src/ai/ai_gui.cpp')
-rw-r--r--src/ai/ai_gui.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ai/ai_gui.cpp b/src/ai/ai_gui.cpp
index beeed22bc..c7ff796d9 100644
--- a/src/ai/ai_gui.cpp
+++ b/src/ai/ai_gui.cpp
@@ -1016,3 +1016,11 @@ void ShowAIDebugWindow(CompanyID show_company)
ShowErrorMessage(STR_ERROR_AI_DEBUG_SERVER_ONLY, INVALID_STRING_ID, WL_INFO);
}
}
+
+/**
+ * Reset the AI windows to their initial state.
+ */
+void InitializeAIGui()
+{
+ AIDebugWindow::ai_debug_company = INVALID_COMPANY;
+}