diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/order_cmd.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp index 800c4aca9..0c43bdd3f 100644 --- a/src/order_cmd.cpp +++ b/src/order_cmd.cpp @@ -1712,6 +1712,12 @@ bool UpdateOrderDest(Vehicle *v, const Order *order, int conditional_depth) return true; case OT_GOTO_DEPOT: + if ((order->GetDepotOrderType() & ODTFB_SERVICE) && !v->NeedsServicing()) { + UpdateVehicleTimetable(v, true); + v->IncrementOrderIndex(); + break; + } + if (v->current_order.GetDepotActionType() & ODATFB_NEAREST_DEPOT) { /* We need to search for the nearest depot (hangar). */ TileIndex location; @@ -1738,9 +1744,6 @@ bool UpdateOrderDest(Vehicle *v, const Order *order, int conditional_depth) UpdateVehicleTimetable(v, true); v->IncrementOrderIndex(); - } else if ((order->GetDepotOrderType() & ODTFB_SERVICE) && !v->NeedsServicing()) { - UpdateVehicleTimetable(v, true); - v->IncrementOrderIndex(); } else { if (v->type != VEH_AIRCRAFT) { v->dest_tile = Depot::Get(order->GetDestination())->xy; |