summaryrefslogtreecommitdiff
path: root/ai.c
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2004-12-30 10:03:35 +0000
committertruelight <truelight@openttd.org>2004-12-30 10:03:35 +0000
commitfe657e9ee35cacf37b4939e632bb033206cf2d04 (patch)
treea0f5b3a24386860688abd056c31bfa80700cf377 /ai.c
parent78cbe3f412df67c239426fcf6314b7c39174205f (diff)
downloadopenttd-fe657e9ee35cacf37b4939e632bb033206cf2d04.tar.xz
(svn r1301) -Codechange: _industries finally has FOR_ALL_INDUSTRIES too
Diffstat (limited to 'ai.c')
-rw-r--r--ai.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ai.c b/ai.c
index 855c39c22..2be8243c1 100644
--- a/ai.c
+++ b/ai.c
@@ -1416,7 +1416,7 @@ static void AiWantOilRigAircraftRoute(Player *p)
t = AiFindRandomTown();
if (t != NULL) {
// Find a random oil rig industry
- in = DEREF_INDUSTRY(RandomRange(lengthof(_industries)));
+ in = DEREF_INDUSTRY(RandomRange(_total_industries));
if (in != NULL && in->type == IT_OIL_RIG) {
if (GetTileDist(t->xy, in->xy) < 60)
break;
@@ -2482,13 +2482,13 @@ static bool AiCheckRoadResources(TileIndex tile, const AiDefaultBlockData *p, by
{
uint values[NUM_CARGO];
int rad;
-
+
if (_patches.modified_catchment) {
- rad = CA_TRUCK; //Same as CA_BUS at the moment?
+ rad = CA_TRUCK; //Same as CA_BUS at the moment?
} else { //change that at some point?
rad = 4;
}
-
+
for(;;p++) {
if (p->mode == 4) {
return true;
@@ -3354,9 +3354,9 @@ static bool AiCheckAirportResources(TileIndex tile, const AiDefaultBlockData *p,
int w,h;
uint tile2;
int rad;
-
+
if (_patches.modified_catchment) {
- rad = CA_AIR_LARGE; //I Have NFI what airport the
+ rad = CA_AIR_LARGE; //I Have NFI what airport the
} else { //AI is going to build here
rad = 4;
}