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 | 059e94e355c9172a42b70ff20b4b8a87dd4889ae (patch) | |
tree | 1d21e0ab2e3402600dc144e6cfc0d1e0b5725da1 /src/ai/default/default.cpp | |
parent | e098b50379219aeb0b8d22d652a3de514759eb3d (diff) | |
download | openttd-059e94e355c9172a42b70ff20b4b8a87dd4889ae.tar.xz |
(svn r12753) -Codechange: do not use IsDepotTypeTile() where simpler function can be used
Diffstat (limited to 'src/ai/default/default.cpp')
-rw-r--r-- | src/ai/default/default.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ai/default/default.cpp b/src/ai/default/default.cpp index 430f487c9..dcdf2f2c4 100644 --- a/src/ai/default/default.cpp +++ b/src/ai/default/default.cpp @@ -330,7 +330,7 @@ static void AiHandleReplaceTrain(Player *p) EngineID veh; // wait until the vehicle reaches the depot. - if (!IsDepotTypeTile(v->tile, TRANSPORT_RAIL) || v->u.rail.track != 0x80 || !(v->vehstatus&VS_STOPPED)) { + if (!IsRailDepotTile(v->tile) || v->u.rail.track != TRACK_BIT_DEPOT || !(v->vehstatus & VS_STOPPED)) { AiHandleGotoDepot(p, CMD_SEND_TRAIN_TO_DEPOT); return; } @@ -2886,7 +2886,7 @@ static bool AiCheckRoadFinished(Player *p) are.dest = _players_ai[p->index].cur_tile_b; tile = TILE_MASK(_players_ai[p->index].cur_tile_a + TileOffsByDiagDir(dir)); - if (IsRoadStopTile(tile) || IsDepotTypeTile(tile, TRANSPORT_ROAD)) return false; + if (IsRoadStopTile(tile) || IsRoadDepotTile(tile)) return false; TrackdirBits bits = TrackStatusToTrackdirBits(GetTileTrackStatus(tile, TRANSPORT_ROAD, ROADTYPES_ROAD)) & DiagdirReachesTrackdirs(dir); if (bits == TRACKDIR_BIT_NONE) return false; @@ -3606,7 +3606,7 @@ static void AiStateSellVeh(Player *p) if (v->owner == _current_player) { if (v->type == VEH_TRAIN) { - if (!IsDepotTypeTile(v->tile, TRANSPORT_RAIL) || v->u.rail.track != 0x80 || !(v->vehstatus&VS_STOPPED)) { + if (!IsRailDepotTile(v->tile) || v->u.rail.track != TRACK_BIT_DEPOT || !(v->vehstatus & VS_STOPPED)) { if (!v->current_order.IsType(OT_GOTO_DEPOT)) DoCommand(0, v->index, 0, DC_EXEC, CMD_SEND_TRAIN_TO_DEPOT); goto going_to_depot; |