mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-09 23:50:25 +00:00
(svn r20229) -Fix [FS#3986]: "Service at nearest depot" behaved the same as "Go to nearest depot"
This commit is contained in:
parent
814be3ae66
commit
8df78e7a7b
@ -1712,6 +1712,12 @@ bool UpdateOrderDest(Vehicle *v, const Order *order, int conditional_depth)
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
case OT_GOTO_DEPOT:
|
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) {
|
if (v->current_order.GetDepotActionType() & ODATFB_NEAREST_DEPOT) {
|
||||||
/* We need to search for the nearest depot (hangar). */
|
/* We need to search for the nearest depot (hangar). */
|
||||||
TileIndex location;
|
TileIndex location;
|
||||||
@ -1736,9 +1742,6 @@ bool UpdateOrderDest(Vehicle *v, const Order *order, int conditional_depth)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
UpdateVehicleTimetable(v, true);
|
|
||||||
v->IncrementOrderIndex();
|
|
||||||
} else if ((order->GetDepotOrderType() & ODTFB_SERVICE) && !v->NeedsServicing()) {
|
|
||||||
UpdateVehicleTimetable(v, true);
|
UpdateVehicleTimetable(v, true);
|
||||||
v->IncrementOrderIndex();
|
v->IncrementOrderIndex();
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user