diff options
author | frosch <frosch@openttd.org> | 2009-05-01 23:16:52 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2009-05-01 23:16:52 +0000 |
commit | a22ff74ef205dc3409c7e743d24892960cdbb0b1 (patch) | |
tree | 25f66a57b848fa3a9cd4a49c591f1e9cf06786e1 /src | |
parent | ea7891fc6a36183848e093c0bd1dd444b0982735 (diff) | |
download | openttd-a22ff74ef205dc3409c7e743d24892960cdbb0b1.tar.xz |
(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.
Diffstat (limited to 'src')
-rw-r--r-- | src/vehicle.cpp | 5 |
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++; |