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

This commit is contained in:
rubidium 2010-07-27 21:46:55 +00:00
parent 814be3ae66
commit 8df78e7a7b
1 changed files with 6 additions and 3 deletions

View File

@ -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 {