(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.

pull/155/head
frosch 16 years ago
parent 9417d8cd18
commit cf0bc6e649

@ -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++;

Loading…
Cancel
Save