(svn r9251) -Fix(r6057, FS#644): Use a less CPU-intensive algorithm to find a random industry for the AI to prevent it slowing down the game. The AI now sucks a even a bit more than before (if that's even possible).

replace/41b28d7194a279bdc17475d4fbe2ea6ec885a466
celestar 18 years ago
parent c5313e3479
commit 124725d863

@ -460,7 +460,10 @@ static Town *AiFindRandomTown()
static Industry *AiFindRandomIndustry()
{
return GetRandomIndustry();
int num = RandomRange(GetMaxIndustryIndex());
if (IsValidIndustry(GetIndustry(num))) return GetIndustry(num);
return NULL;
}
static void AiFindSubsidyIndustryRoute(FoundRoute *fr)

Loading…
Cancel
Save