summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/vehicle.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp
index 3f1e06dea..b2769516e 100644
--- a/src/vehicle.cpp
+++ b/src/vehicle.cpp
@@ -1057,8 +1057,9 @@ void VehicleEnterDepot(Vehicle *v)
}
}
- if (t.GetDepotOrderType() & ODTFB_PART_OF_ORDERS &&
- (v->type == VEH_AIRCRAFT ? t.GetDestination() == GetStationIndex(v->tile) : v->dest_tile == v->tile)) {
+ if (t.GetDepotOrderType() & ODTFB_PART_OF_ORDERS && (
+ (t.GetDepotOrderType() && ODATFB_NEAREST_DEPOT) || // The target depot is only updated on junctions, but we want to accept every depot.
+ (v->type == VEH_AIRCRAFT ? t.GetDestination() == GetStationIndex(v->tile) : v->dest_tile == v->tile))) {
/* Part of orders */
UpdateVehicleTimetable(v, true);
v->cur_order_index++;