mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-08 23:19:40 +00:00
(svn r1757) Stop the new AI from trying to build its HQ on non-existent tiles
This commit is contained in:
parent
aa592190dc
commit
ff973f7992
2
ai_new.c
2
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
|
// We have no HQ yet, build one on a random place
|
||||||
// Random till we found a place for it!
|
// Random till we found a place for it!
|
||||||
// TODO: this should not be on a random place..
|
// 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
|
// Enough for now, but we want to come back here the next time
|
||||||
// so we do not change any status
|
// so we do not change any status
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user