mirror of https://github.com/OpenTTD/OpenTTD
(svn r1994) Fix: 1159456 - hopefully prevent the new AI to get stuck in an infinite loop forlorny trying to build its haven. Unintentionally bundled with trivial tidyup.
parent
f820aa3f60
commit
89d1c60c3f
4
ai_new.c
4
ai_new.c
|
@ -9,6 +9,8 @@
|
||||||
// TODO: als er iets in path komt, bouwt AI gewoon verder :(
|
// TODO: als er iets in path komt, bouwt AI gewoon verder :(
|
||||||
// TODO: mail routes
|
// TODO: mail routes
|
||||||
|
|
||||||
|
// FIXME: This code is horrible. Indisputably from the style POV, at least. --pasky
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* End of Dutch part
|
* End of Dutch part
|
||||||
*/
|
*/
|
||||||
|
@ -92,7 +94,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() % MapSize())) { }
|
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