summaryrefslogtreecommitdiff
path: root/src/ai/default
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-08-29 21:49:08 +0000
committerrubidium <rubidium@openttd.org>2007-08-29 21:49:08 +0000
commitc2dcccae163cf7ae604540528c08fed45dd0dbda (patch)
treeeb86df4a79dffa6270deda722c234ab9cb3c8964 /src/ai/default
parent3a0e647c0eacf9619ad61e8e0c8f59a588886d27 (diff)
downloadopenttd-c2dcccae163cf7ae604540528c08fed45dd0dbda.tar.xz
(svn r11001) -Codechange: unify the way to determine whether a vehicle is in a depot.
Diffstat (limited to 'src/ai/default')
-rw-r--r--src/ai/default/default.cpp8
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;