mirror of https://github.com/OpenTTD/OpenTTD
(svn r14577) -Fix [FS#2403]: vehicle didn't respect its 'refit in nearest depot' order (Swallow)
parent
a13108d5b6
commit
f28172c5f4
|
@ -1623,7 +1623,7 @@ bool UpdateOrderDest(Vehicle *v, const Order *order, int conditional_depth)
|
||||||
|
|
||||||
if (v->FindClosestDepot(&location, &destination, &reverse)) {
|
if (v->FindClosestDepot(&location, &destination, &reverse)) {
|
||||||
v->dest_tile = location;
|
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 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);
|
if (v->type == VEH_TRAIN && reverse) DoCommand(v->tile, v->index, 0, DC_EXEC, CMD_REVERSE_TRAIN_DIRECTION);
|
||||||
|
|
Loading…
Reference in New Issue