summaryrefslogtreecommitdiff
path: root/ai/trolly
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-05-21 16:18:58 +0000
committertron <tron@openttd.org>2006-05-21 16:18:58 +0000
commit58458812a46ba4beec0aca3875d640c26c152eb5 (patch)
tree49a1ba035d8221d5cb20296fb4a24283fdbb7d42 /ai/trolly
parent965ac2c1e66294f374abcf2c1d90c761eaeb987e (diff)
downloadopenttd-58458812a46ba4beec0aca3875d640c26c152eb5.tar.xz
(svn r4943) uint tile -> TileIndex tile, byte player -> PlayerID player
Diffstat (limited to 'ai/trolly')
-rw-r--r--ai/trolly/build.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ai/trolly/build.c b/ai/trolly/build.c
index 66728c29a..2b6342604 100644
--- a/ai/trolly/build.c
+++ b/ai/trolly/build.c
@@ -233,11 +233,12 @@ EngineID AiNew_PickVehicle(Player *p)
// Let's check it backwards.. we simply want to best engine available..
for (i = end - 1; i >= start; i--) {
+ const Engine* e = GetEngine(i);
int32 ret;
// Is it availiable?
// Also, check if the reliability of the vehicle is above the AI_VEHICLE_MIN_RELIABILTY
- if (!HASBIT(GetEngine(i)->player_avail, _current_player) || GetEngine(i)->reliability * 100 < AI_VEHICLE_MIN_RELIABILTY << 16) continue;
+ if (!HASBIT(e->player_avail, _current_player) || e->reliability * 100 < AI_VEHICLE_MIN_RELIABILTY << 16) continue;
// Can we build it?
ret = AI_DoCommand(0, i, 0, DC_QUERY_COST, CMD_BUILD_ROAD_VEH);
if (!CmdFailed(ret)) return i;