(svn r13432) [NoAI] -Fix r13290: in case of a network-client, AI_StartNewAI() should never be called
--- a/src/players.cpp Mon Jun 09 11:36:21 2008 +0000
+++ b/src/players.cpp Mon Jun 09 11:46:30 2008 +0000
@@ -550,7 +550,7 @@
InvalidateWindow(WC_TOOLBAR_MENU, 0);
InvalidateWindow(WC_CLIENT_LIST, 0);
- p->is_active = !is_ai || AI_StartNewAI(p->index);
+ p->is_active = !is_ai || !_network_server || AI_StartNewAI(p->index);
free(p->num_engines);
p->num_engines = CallocT<uint16>(GetEnginePoolSize());
@@ -1324,7 +1324,7 @@
p->is_noai = true;
/* This is needed so an AI is attached to a loaded AI */
- p->is_ai = p->is_ai && AI_StartNewAI(p->index);
+ p->is_ai = p->is_ai && (!_network_server || AI_StartNewAI(p->index));
}
}