summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-08-23 21:21:41 +0000
committerrubidium <rubidium@openttd.org>2010-08-23 21:21:41 +0000
commit8ce06a09b9ce561cd823793dfb8c18aee894fd76 (patch)
tree72a41ec09d3431a0e34040b5c053299ad787bffd /src
parent0fd73dee60665c44d7131750d8a4c1ed1203cc3f (diff)
downloadopenttd-8ce06a09b9ce561cd823793dfb8c18aee894fd76.tar.xz
(svn r20600) -Fix [FS#4075]: "downscale" a full load order to a load if possible order when removing the order while the vehicle is loading. This to prevent the vehicle from (possibly) staying forever in the station
Diffstat (limited to 'src')
-rw-r--r--src/order_cmd.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp
index 38096e877..b792c9beb 100644
--- a/src/order_cmd.cpp
+++ b/src/order_cmd.cpp
@@ -773,6 +773,9 @@ CommandCost CmdDeleteOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
* on his order list or not */
if (sel_ord == u->cur_order_index && u->current_order.IsType(OT_LOADING)) {
u->current_order.SetNonStopType(ONSF_STOP_EVERYWHERE);
+ /* When full loading, "cancel" that order so the vehicle doesn't
+ * stay indefinitely at this station anymore. */
+ if (u->current_order.GetLoadType() & OLFB_FULL_LOAD) u->current_order.SetLoadType(OLF_LOAD_IF_POSSIBLE);
}
/* Update any possible open window of the vehicle */