From cf0bc6e649b827c14f24bff453a4cc4a1ae19952 Mon Sep 17 00:00:00 2001 From: frosch Date: Fri, 1 May 2009 23:16:52 +0000 Subject: [PATCH] (svn r16198) -Fix/Change (r16187): 'Go to nearest depot'-orders are fulfilled when reaching any depot, even though the train decided for a different depot on the last junction/order-skip. --- src/vehicle.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/vehicle.cpp b/src/vehicle.cpp index 3f1e06deae..b2769516e7 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++;