(svn r14577) -Fix [FS#2403]: vehicle didn't respect its 'refit in nearest depot' order (Swallow)
authorsmatz
Tue, 11 Nov 2008 22:51:27 +0000
changeset 10327 761feb630a51
parent 10326 22248e13c989
child 10328 7500e2e4c8ab
(svn r14577) -Fix [FS#2403]: vehicle didn't respect its 'refit in nearest depot' order (Swallow)
src/order_cmd.cpp
--- a/src/order_cmd.cpp	Tue Nov 11 18:47:46 2008 +0000
+++ b/src/order_cmd.cpp	Tue Nov 11 22:51:27 2008 +0000
@@ -1623,7 +1623,7 @@
 
 				if (v->FindClosestDepot(&location, &destination, &reverse)) {
 					v->dest_tile = location;
-					v->current_order.MakeGoToDepot(destination, v->current_order.GetDepotOrderType());
+					v->current_order.MakeGoToDepot(destination, v->current_order.GetDepotOrderType(), v->current_order.GetRefitCargo(), v->current_order.GetRefitSubtype());
 
 					/* If there is no depot in front, reverse automatically (trains only) */
 					if (v->type == VEH_TRAIN && reverse) DoCommand(v->tile, v->index, 0, DC_EXEC, CMD_REVERSE_TRAIN_DIRECTION);