From 31f218fdf9fe416acb05a50aea145bc59c677a39 Mon Sep 17 00:00:00 2001 From: truelight Date: Mon, 21 Nov 2005 14:28:31 +0000 Subject: (svn r3224) -Add: Allow the NewAI to work in Multiplayer Games (switchable via patch settings, off by defaut). An other step to AIScripts. WARNING: this is still highly experimental and has known bugs! --- ai/ai.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ai/ai.c') diff --git a/ai/ai.c b/ai/ai.c index 5029d360d..b3d3af123 100644 --- a/ai/ai.c +++ b/ai/ai.c @@ -145,6 +145,14 @@ void AI_RunGameLoop(void) /* Don't do anything if ai is disabled */ if (!_ai.enabled) return; + /* Don't do anything if we are a network-client + * (too bad when a client joins, he thinks the AIs are real, so it wants to control + * them.. this avoids that, while loading a network game in singleplayer, does make + * the AIs to continue ;)) + */ + if (_networking && !_network_server && !_ai.network_client) + return; + /* New tick */ _ai.tick++; -- cgit v1.2.3-70-g09d2