diff options
author | rubidium <rubidium@openttd.org> | 2007-08-29 21:49:08 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-08-29 21:49:08 +0000 |
commit | a407d53d1b2a329a5ae747ea83d4652427cc6c8a (patch) | |
tree | eb86df4a79dffa6270deda722c234ab9cb3c8964 /src/ai | |
parent | a28d33b5dc89e47ae271b5dbdcc4f5e6f1784c6c (diff) | |
download | openttd-a407d53d1b2a329a5ae747ea83d4652427cc6c8a.tar.xz |
(svn r11001) -Codechange: unify the way to determine whether a vehicle is in a depot.
Diffstat (limited to 'src/ai')
-rw-r--r-- | src/ai/default/default.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ai/default/default.cpp b/src/ai/default/default.cpp index 24755a281..b28e2a2b8 100644 --- a/src/ai/default/default.cpp +++ b/src/ai/default/default.cpp @@ -338,7 +338,7 @@ static void AiHandleReplaceRoadVeh(Player *p) BackuppedOrders orderbak[1]; EngineID veh; - if (!IsRoadVehInDepotStopped(v)) { + if (!v->IsStoppedInDepot()) { AiHandleGotoDepot(p, CMD_SEND_ROADVEH_TO_DEPOT); return; } @@ -367,7 +367,7 @@ static void AiHandleReplaceAircraft(Player *p) BackuppedOrders orderbak[1]; EngineID veh; - if (!IsAircraftInHangarStopped(v)) { + if (!v->IsStoppedInDepot()) { AiHandleGotoDepot(p, CMD_SEND_AIRCRAFT_TO_HANGAR); return; } @@ -3578,7 +3578,7 @@ static void AiStateSellVeh(Player *p) DoCommand(v->tile, v->index, 1, DC_EXEC, CMD_SELL_RAIL_WAGON); } else if (v->type == VEH_ROAD) { - if (!IsRoadVehInDepotStopped(v)) { + if (!v->IsStoppedInDepot()) { if (v->current_order.type != OT_GOTO_DEPOT) DoCommand(0, v->index, 0, DC_EXEC, CMD_SEND_ROADVEH_TO_DEPOT); goto going_to_depot; @@ -3586,7 +3586,7 @@ static void AiStateSellVeh(Player *p) DoCommand(0, v->index, 0, DC_EXEC, CMD_SELL_ROAD_VEH); } else if (v->type == VEH_AIRCRAFT) { - if (!IsAircraftInHangarStopped(v)) { + if (!v->IsStoppedInDepot()) { if (v->current_order.type != OT_GOTO_DEPOT) DoCommand(0, v->index, 0, DC_EXEC, CMD_SEND_AIRCRAFT_TO_HANGAR); goto going_to_depot; |