ai/default/default.c
branch0.5
changeset 5468 10836820b2bc
parent 5247 c3eece01af11
child 5482 cf9c0b5d3bb3
equal deleted inserted replaced
5467:24a2a4d58223 5468:10836820b2bc
   457 	return GetRandomTown();
   457 	return GetRandomTown();
   458 }
   458 }
   459 
   459 
   460 static Industry *AiFindRandomIndustry(void)
   460 static Industry *AiFindRandomIndustry(void)
   461 {
   461 {
   462 	return GetRandomIndustry();
   462 	int num = RandomRange(GetMaxIndustryIndex());
       
   463 	if (IsValidIndustry(GetIndustry(num))) return GetIndustry(num);
       
   464 
       
   465 	return NULL;
   463 }
   466 }
   464 
   467 
   465 static void AiFindSubsidyIndustryRoute(FoundRoute *fr)
   468 static void AiFindSubsidyIndustryRoute(FoundRoute *fr)
   466 {
   469 {
   467 	uint i;
   470 	uint i;