(svn r9832) -Fix: leave the station when manually skipping to the next order and we are currently (un)loading.
authorrubidium
Sun, 13 May 2007 22:10:04 +0000
changeset 7108 7ff0e571c766
parent 7107 c8e507a51696
child 7109 7d410365d6fc
(svn r9832) -Fix: leave the station when manually skipping to the next order and we are currently (un)loading.
src/order_cmd.cpp
--- a/src/order_cmd.cpp	Sun May 13 21:24:58 2007 +0000
+++ b/src/order_cmd.cpp	Sun May 13 22:10:04 2007 +0000
@@ -583,10 +583,12 @@
 
 		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);
 	}