From c2dcccae163cf7ae604540528c08fed45dd0dbda Mon Sep 17 00:00:00 2001 From: rubidium Date: Wed, 29 Aug 2007 21:49:08 +0000 Subject: (svn r11001) -Codechange: unify the way to determine whether a vehicle is in a depot. --- src/ai/default/default.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/ai/default') 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; -- cgit v1.2.3-70-g09d2