diff options
author | smatz <smatz@openttd.org> | 2008-04-17 18:24:45 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2008-04-17 18:24:45 +0000 |
commit | ec588da9e85bd4f9dffaa3354ed1d9f8b74eced7 (patch) | |
tree | 1d21e0ab2e3402600dc144e6cfc0d1e0b5725da1 /src/ai/trolly | |
parent | b0e687f60c006c31a069a523d50915f9169b88b1 (diff) | |
download | openttd-ec588da9e85bd4f9dffaa3354ed1d9f8b74eced7.tar.xz |
(svn r12753) -Codechange: do not use IsDepotTypeTile() where simpler function can be used
Diffstat (limited to 'src/ai/trolly')
-rw-r--r-- | src/ai/trolly/pathfinder.cpp | 2 | ||||
-rw-r--r-- | src/ai/trolly/trolly.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/ai/trolly/pathfinder.cpp b/src/ai/trolly/pathfinder.cpp index 36bbb748a..15052cc39 100644 --- a/src/ai/trolly/pathfinder.cpp +++ b/src/ai/trolly/pathfinder.cpp @@ -45,7 +45,7 @@ static bool IsRoad(TileIndex tile) { return // MP_ROAD, but not a road depot? - (IsTileType(tile, MP_ROAD) && !IsDepotTypeTile(tile, TRANSPORT_ROAD)) || + (IsTileType(tile, MP_ROAD) && !IsRoadDepot(tile)) || (IsTileType(tile, MP_TUNNELBRIDGE) && GetTunnelBridgeTransportType(tile) == TRANSPORT_ROAD); } diff --git a/src/ai/trolly/trolly.cpp b/src/ai/trolly/trolly.cpp index 8a419ca09..851f1092e 100644 --- a/src/ai/trolly/trolly.cpp +++ b/src/ai/trolly/trolly.cpp @@ -1254,8 +1254,8 @@ static void AiNew_CheckVehicle(Player *p, Vehicle *v) // We are already sending him back if (AiNew_GetSpecialVehicleFlag(p, v) & AI_VEHICLEFLAG_SELL) { - if (v->type == VEH_ROAD && IsDepotTypeTile(v->tile, TRANSPORT_ROAD) && - (v->vehstatus&VS_STOPPED)) { + if (v->type == VEH_ROAD && IsRoadDepotTile(v->tile) && + (v->vehstatus & VS_STOPPED)) { // We are at the depot, sell the vehicle AI_DoCommand(0, v->index, 0, DC_EXEC, CMD_SELL_ROAD_VEH); } |