vehicle.c
changeset 2600 3266a93d1444
parent 2599 ad75080afea4
child 2601 d1a193af01e6
--- a/vehicle.c	Fri Nov 04 20:52:03 2005 +0000
+++ b/vehicle.c	Fri Nov 04 22:10:49 2005 +0000
@@ -527,7 +527,7 @@
 void VehicleEnteredDepotThisTick(Vehicle *v)
 {
 	// we need to set v->leave_depot_instantly as we have no control of it's contents at this time
-	if (HASBIT(v->current_order.flags, OFB_HALT_IN_DEPOT) && !HASBIT(v->current_order.flags, OFB_PART_OF_ORDERS)) {
+	if (HASBIT(v->current_order.flags, OFB_HALT_IN_DEPOT) && !HASBIT(v->current_order.flags, OFB_PART_OF_ORDERS) && v->current_order.type == OT_GOTO_DEPOT) {
 		// we keep the vehicle in the depot since the user ordered it to stay
 		v->leave_depot_instantly = false;
 	} else {