1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-31 02:19:09 +00:00

(svn r3080) byte -> PlayerID, int -> EngineID, -1 -> INVALID_ENGINE

This commit is contained in:
tron
2005-10-24 05:51:23 +00:00
parent f5ea31b9da
commit e0dd7efc82
3 changed files with 9 additions and 8 deletions

View File

@@ -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;
}