(svn r13435) [NoAI] -Fix r13432: still the statements were wrong ... 3rd time is the charm :) noai
authortruebrain
Mon, 09 Jun 2008 14:38:23 +0000
branchnoai
changeset 10884 879d4205a9d0
parent 10881 5ad702d5b62d
child 10885 415791bee9d7
(svn r13435) [NoAI] -Fix r13432: still the statements were wrong ... 3rd time is the charm :)
src/players.cpp
--- a/src/players.cpp	Mon Jun 09 11:46:30 2008 +0000
+++ b/src/players.cpp	Mon Jun 09 14:38:23 2008 +0000
@@ -550,7 +550,7 @@
 	InvalidateWindow(WC_TOOLBAR_MENU, 0);
 	InvalidateWindow(WC_CLIENT_LIST, 0);
 
-	p->is_active = !is_ai || !_network_server || AI_StartNewAI(p->index);
+	p->is_active = !is_ai || (_networking && !_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 && (!_network_server || AI_StartNewAI(p->index));
+		p->is_ai = p->is_ai && ((_networking && !_network_server) || AI_StartNewAI(p->index));
 	}
 }