diff options
author | rubidium <rubidium@openttd.org> | 2006-05-09 08:25:31 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2006-05-09 08:25:31 +0000 |
commit | e5bd292dabdf5bbf58e5ce83c13688bbe047a62a (patch) | |
tree | 765d216fd61a2487ac5b4e9ca1bf318934ceac3c /ai | |
parent | 9b1bbf72ee7ebb545ba7dc0ea11a84fc18b11c45 (diff) | |
download | openttd-e5bd292dabdf5bbf58e5ce83c13688bbe047a62a.tar.xz |
(svn r4789) - Codechange: rename RoadType to RoadTileType and ROAD_{NORMAL,CROSSING,DEPOT} to ROAD_TILE_* for consistency
Diffstat (limited to 'ai')
-rw-r--r-- | ai/default/default.c | 8 | ||||
-rw-r--r-- | ai/trolly/trolly.c | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/ai/default/default.c b/ai/default/default.c index 3740ae046..c0d19adee 100644 --- a/ai/default/default.c +++ b/ai/default/default.c @@ -2546,7 +2546,7 @@ static int32 AiDoBuildDefaultRoadBlock(TileIndex tile, const AiDefaultBlockData if (p->mode == 2) { if (IsTileType(c, MP_STREET) && - GetRoadType(c) == ROAD_NORMAL && + GetRoadTileType(c) == ROAD_TILE_NORMAL && (GetRoadBits(c) & p->attr) != 0) { roadflag |= 2; @@ -2588,7 +2588,7 @@ clear_town_stuff:; if (GetTileSlope(c, NULL) != SLOPE_FLAT) return CMD_ERROR; - if (!IsTileType(c, MP_STREET) || GetRoadType(c) != ROAD_NORMAL) { + if (!IsTileType(c, MP_STREET) || GetRoadTileType(c) != ROAD_TILE_NORMAL) { ret = DoCommand(c, 0, 0, flag | DC_AUTO | DC_NO_WATER | DC_AI_BUILDING, CMD_LANDSCAPE_CLEAR); if (CmdFailed(ret)) return CMD_ERROR; } @@ -2765,7 +2765,7 @@ static bool AiEnumFollowRoad(TileIndex tile, AiRoadEnum *a, int track, uint leng if (dist <= a->best_dist) { TileIndex tile2 = TILE_MASK(tile + TileOffsByDir(_dir_by_track[track])); - if (IsTileType(tile2, MP_STREET) && GetRoadType(tile2) == ROAD_NORMAL) { + if (IsTileType(tile2, MP_STREET) && GetRoadTileType(tile2) == ROAD_TILE_NORMAL) { a->best_dist = dist; a->best_tile = tile; a->best_track = track; @@ -3653,7 +3653,7 @@ pos_3: if (IsLevelCrossing(tile)) goto is_rail_crossing; - if (GetRoadType(tile) == ROAD_DEPOT) { + if (GetRoadTileType(tile) == ROAD_TILE_DEPOT) { DiagDirection dir; // Check if there are any stations around. diff --git a/ai/trolly/trolly.c b/ai/trolly/trolly.c index 257990164..5e8334ba2 100644 --- a/ai/trolly/trolly.c +++ b/ai/trolly/trolly.c @@ -796,7 +796,7 @@ static void AiNew_State_FindDepot(Player *p) TileIndex t = tile + TileOffsByDir(j); if (IsTileType(t, MP_STREET) && - GetRoadType(t) == ROAD_DEPOT && + GetRoadTileType(t) == ROAD_TILE_DEPOT && IsTileOwner(t, _current_player) && GetRoadDepotDirection(t) == ReverseDiagDir(j)) { p->ainew.depot_tile = t; @@ -1097,7 +1097,7 @@ static void AiNew_State_BuildDepot(Player *p) int res = 0; assert(p->ainew.state == AI_STATE_BUILD_DEPOT); - if (IsTileType(p->ainew.depot_tile, MP_STREET) && GetRoadType(p->ainew.depot_tile) == ROAD_DEPOT) { + if (IsTileType(p->ainew.depot_tile, MP_STREET) && GetRoadTileType(p->ainew.depot_tile) == ROAD_TILE_DEPOT) { if (IsTileOwner(p->ainew.depot_tile, _current_player)) { // The depot is already builded! p->ainew.state = AI_STATE_BUILD_VEHICLE; |