summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/aircraft_cmd.cpp1
-rw-r--r--src/roadveh_cmd.cpp3
-rw-r--r--src/ship_cmd.cpp1
3 files changed, 5 insertions, 0 deletions
diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp
index 546022d83..0d4c3ba10 100644
--- a/src/aircraft_cmd.cpp
+++ b/src/aircraft_cmd.cpp
@@ -719,6 +719,7 @@ static void CheckIfAircraftNeedsService(Vehicle *v)
if (st->IsValid() && st->airport_tile != 0 && st->Airport()->terminals != NULL) {
// printf("targetairport = %d, st->index = %d\n", v->u.air.targetairport, st->index);
// v->u.air.targetairport = st->index;
+ if (v->current_order.type == OT_LOADING) v->LeaveStation();
v->current_order.type = OT_GOTO_DEPOT;
v->current_order.flags = OF_NON_STOP;
InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR);
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp
index aff10c3f8..c7da5fcd0 100644
--- a/src/roadveh_cmd.cpp
+++ b/src/roadveh_cmd.cpp
@@ -1686,6 +1686,9 @@ static void CheckIfRoadVehNeedsService(Vehicle *v)
return;
}
+ if (v->current_order.type == OT_LOADING) v->LeaveStation();
+ ClearSlot(v);
+
v->current_order.type = OT_GOTO_DEPOT;
v->current_order.flags = OF_NON_STOP;
v->current_order.dest = depot->index;
diff --git a/src/ship_cmd.cpp b/src/ship_cmd.cpp
index ef887873d..e50d0376b 100644
--- a/src/ship_cmd.cpp
+++ b/src/ship_cmd.cpp
@@ -165,6 +165,7 @@ static void CheckIfShipNeedsService(Vehicle *v)
return;
}
+ if (v->current_order.type == OT_LOADING) v->LeaveStation();
v->current_order.type = OT_GOTO_DEPOT;
v->current_order.flags = OF_NON_STOP;
v->current_order.dest = depot->index;