summaryrefslogtreecommitdiff
path: root/ai/default
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-10-24 05:51:23 +0000
committertron <tron@openttd.org>2005-10-24 05:51:23 +0000
commite0dd7efc82fbe232c59e4c5a84d714159b3e7d5f (patch)
tree6dc263fd70c0d1f299ae51bc048964cf0729e0e6 /ai/default
parentf5ea31b9daa2fa9c290df3903cd37acd02e2345d (diff)
downloadopenttd-e0dd7efc82fbe232c59e4c5a84d714159b3e7d5f.tar.xz
(svn r3080) byte -> PlayerID, int -> EngineID, -1 -> INVALID_ENGINE
Diffstat (limited to 'ai/default')
-rw-r--r--ai/default/default.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ai/default/default.c b/ai/default/default.c
index f154aec8a..3c8264604 100644
--- a/ai/default/default.c
+++ b/ai/default/default.c
@@ -3183,14 +3183,15 @@ static void AiStateBuildRoadVehicles(Player *p)
const AiDefaultBlockData *ptr;
TileIndex tile;
uint loco_id;
- int veh, i;
+ EngineID veh;
+ int i;
ptr = _road_default_block_data[p->ai.src.cur_building_rule]->data;
for(;ptr->mode != 0;ptr++) {}
tile = TILE_ADD(p->ai.src.use_tile, ToTileIndexDiff(ptr->tileoffs));
veh = AiChooseRoadVehToBuild(p->ai.cargo_type, p->player_money, tile);
- if (veh == -1) {
+ if (veh == INVALID_ENGINE) {
p->ai.state = AIS_0;
return;
}