(svn r13583) [NoAI] -Fix: in MultiPlayer, prevent AIDebug window opening for clients.
--- a/src/ai/ai_gui.cpp Thu Jun 19 16:26:56 2008 +0000
+++ b/src/ai/ai_gui.cpp Thu Jun 19 16:33:24 2008 +0000
@@ -19,6 +19,7 @@
#include "../gfx_func.h"
#include "../debug.h"
#include "../command_func.h"
+#include "../network/network.h"
#include "ai.h"
#include "api/ai_types.hpp"
@@ -247,5 +248,9 @@
void ShowAIDebugWindow()
{
- AllocateWindowDescFront<AIDebugWindow>(&_ai_debug_desc, 0);
+ if (!_networking || _network_server) {
+ AllocateWindowDescFront<AIDebugWindow>(&_ai_debug_desc, 0);
+ } else {
+ ShowErrorMessage(INVALID_STRING_ID, STR_AI_DEBUG_SERVER_ONLY, 0, 0);
+ }
}
--- a/src/lang/english.txt Thu Jun 19 16:26:56 2008 +0000
+++ b/src/lang/english.txt Thu Jun 19 16:33:24 2008 +0000
@@ -3566,6 +3566,7 @@
STR_AI_DEBUG_NAME_TIP :{BLACK}Name of the AI
STR_AI_DEBUG_RELOAD :{BLACK}Reload AI
STR_AI_DEBUG_RELOAD_TIP :{BLACK}Kill the AI, reload the script, and restart the AI
+STR_AI_DEBUG_SERVER_ONLY :{YELLOW}AI Debug window is only available for the server
########
############ town controlled noise level