summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-05-13 22:10:04 +0000
committerrubidium <rubidium@openttd.org>2007-05-13 22:10:04 +0000
commite72ab0fdf5f72221eee6f2eebea54e6d9560b7f3 (patch)
tree84323c97b4a68d349121ed2b8ec82a84a85ba656
parentd78651f7b1a786f655d526dfab384e8e2d787c57 (diff)
downloadopenttd-e72ab0fdf5f72221eee6f2eebea54e6d9560b7f3.tar.xz
(svn r9832) -Fix: leave the station when manually skipping to the next order and we are currently (un)loading.
-rw-r--r--src/order_cmd.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp
index 08c404785..912e5b2a8 100644
--- a/src/order_cmd.cpp
+++ b/src/order_cmd.cpp
@@ -583,10 +583,12 @@ int32 CmdSkipOrder(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
if (v->type == VEH_ROAD) ClearSlot(v);
- /* NON-stop flag is misused to see if a train is in a station that is
- * on his order list or not */
- if (v->current_order.type == OT_LOADING && HASBIT(v->current_order.flags, OFB_NON_STOP))
- v->current_order.flags = 0;
+ if (v->current_order.type == OT_LOADING) {
+ v->LeaveStation();
+ /* NON-stop flag is misused to see if a train is in a station that is
+ * on his order list or not */
+ if (HASBIT(v->current_order.flags, OFB_NON_STOP)) v->current_order.flags = 0;
+ }
InvalidateVehicleOrder(v);
}