Mercurial > hg > openttd
changeset 15569:919e5dbec304 draft
(svn r20229) -Fix [FS#3986]: "Service at nearest depot" behaved the same as "Go to nearest depot"
author | rubidium <rubidium@openttd.org> |
---|---|
date | Tue, 27 Jul 2010 21:46:55 +0000 |
parents | 35316ec15c12 |
children | 8aa97022946d |
files | src/order_cmd.cpp |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/order_cmd.cpp +++ b/src/order_cmd.cpp @@ -1712,6 +1712,12 @@ 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; @@ -1738,9 +1744,6 @@ UpdateVehicleTimetable(v, true); v->IncrementOrderIndex(); - } else if ((order->GetDepotOrderType() & ODTFB_SERVICE) && !v->NeedsServicing()) { - UpdateVehicleTimetable(v, true); - v->IncrementOrderIndex(); } else { if (v->type != VEH_AIRCRAFT) { v->dest_tile = Depot::Get(order->GetDestination())->xy;