From 2357280ca017304026d2ab75323bbafc4360ec74 Mon Sep 17 00:00:00 2001 From: tron Date: Mon, 31 Jan 2005 22:17:15 +0000 Subject: (svn r1757) Stop the new AI from trying to build its HQ on non-existent tiles --- ai_new.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ai_new.c b/ai_new.c index ccaffd124..c6bcfae0e 100644 --- a/ai_new.c +++ b/ai_new.c @@ -90,7 +90,7 @@ static void AiNew_State_WakeUp(Player *p) { // We have no HQ yet, build one on a random place // Random till we found a place for it! // TODO: this should not be on a random place.. - while (!AiNew_Build_CompanyHQ(p, (Random()&0xFFFF))) { } + while (!AiNew_Build_CompanyHQ(p, Random() % MapSize())) { } // Enough for now, but we want to come back here the next time // so we do not change any status return; -- cgit v1.2.3-70-g09d2