summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2008-08-27 19:21:01 +0000
committerfrosch <frosch@openttd.org>2008-08-27 19:21:01 +0000
commit7ce75961b462b5f0173cde9b86542707cb22e242 (patch)
treec53d371a9c13f73b6fee0335c85cbf7928303b83
parent361292bd234b1c615125b3e0fb684233d8ff9d3f (diff)
downloadopenttd-7ce75961b462b5f0173cde9b86542707cb22e242.tar.xz
(svn r14178) -Fix [FS#2256]: Do not evaluate GetDestination() for go-to-nearest-depot-orders.
-rw-r--r--src/order_cmd.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp
index 94330096a..88a2343f4 100644
--- a/src/order_cmd.cpp
+++ b/src/order_cmd.cpp
@@ -1465,6 +1465,7 @@ void RemoveOrderFromAllVehicles(OrderType type, DestinationID destination)
/* Clear the order from the order-list */
invalidate = false;
FOR_VEHICLE_ORDERS(v, order) {
+ if (order->IsType(OT_GOTO_DEPOT) && (order->GetDepotActionType() & ODATFB_NEAREST_DEPOT) != 0) continue;
if ((v->type == VEH_AIRCRAFT && order->IsType(OT_GOTO_DEPOT) ? OT_GOTO_STATION : order->GetType()) == type &&
order->GetDestination() == destination) {
order->MakeDummy();