From 788ace088d8b3ba2afd77a8b21b532abc40d9eba Mon Sep 17 00:00:00 2001 From: truelight Date: Fri, 20 Aug 2004 09:32:32 +0000 Subject: (svn r85) -Add: initial commit of new AI (enable in Patch menu) -Add: generalised A* Algorithm -Add: generalised queues (Fifo, Stack, InsSort, BinaryHeap) --- players.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'players.c') diff --git a/players.c b/players.c index 5901b0db0..833f1dcf2 100644 --- a/players.c +++ b/players.c @@ -8,6 +8,7 @@ #include "news.h" #include "saveload.h" #include "command.h" +#include "ai.h" extern void StartupEconomy(); @@ -543,13 +544,16 @@ void OnTick_Players() void RunOtherPlayersLoop() { Player *p; - + _is_ai_player = true; FOR_ALL_PLAYERS(p) { if (p->is_active) { _current_player = p->index; - AiDoGameLoop(p); + if (_patches.ainew_active) + AiNewDoGameLoop(p); + else + AiDoGameLoop(p); } } -- cgit v1.2.3-54-g00ecf