summaryrefslogtreecommitdiff
path: root/src/order_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/order_cmd.cpp')
-rw-r--r--src/order_cmd.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp
index d9d741dbc..83dacdca4 100644
--- a/src/order_cmd.cpp
+++ b/src/order_cmd.cpp
@@ -2093,6 +2093,13 @@ bool UpdateOrderDest(Vehicle *v, const Order *order, int conditional_depth, bool
} else {
if (v->type != VEH_AIRCRAFT) {
v->SetDestTile(Depot::Get(order->GetDestination())->xy);
+ } else {
+ Aircraft *a = Aircraft::From(v);
+ DestinationID destination = a->current_order.GetDestination();
+ if (a->targetairport != destination) {
+ /* The aircraft is now heading for a different hangar than the next in the orders */
+ a->SetDestTile(a->GetOrderStationLocation(destination));
+ }
}
return true;
}