(svn r20229) -Fix [FS#3986]: "Service at nearest depot" behaved the same as "Go to nearest depot"

pull/155/head
rubidium 14 years ago
parent b35c53529f
commit f10c7255f4

@ -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;
@ -1736,9 +1742,6 @@ bool UpdateOrderDest(Vehicle *v, const Order *order, int conditional_depth)
return true;
}
UpdateVehicleTimetable(v, true);
v->IncrementOrderIndex();
} else if ((order->GetDepotOrderType() & ODTFB_SERVICE) && !v->NeedsServicing()) {
UpdateVehicleTimetable(v, true);
v->IncrementOrderIndex();
} else {

Loading…
Cancel
Save