diff options
author | tron <tron@openttd.org> | 2005-01-31 22:17:15 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-01-31 22:17:15 +0000 |
commit | 2357280ca017304026d2ab75323bbafc4360ec74 (patch) | |
tree | ca590b96d91a42b61598559488e854e32cacfd31 | |
parent | 9ca00b845a212759016250dddd25ca3226906c15 (diff) | |
download | openttd-2357280ca017304026d2ab75323bbafc4360ec74.tar.xz |
(svn r1757) Stop the new AI from trying to build its HQ on non-existent tiles
-rw-r--r-- | ai_new.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |