summaryrefslogtreecommitdiff
path: root/src/order_cmd.cpp
diff options
context:
space:
mode:
authorMichael Lutz <michi@icosahedron.de>2021-10-03 15:39:49 +0200
committerMichael Lutz <michi@icosahedron.de>2021-12-16 22:28:32 +0100
commitb6933a2ebdf66c5fb23b2226d3ce07d71426d7d2 (patch)
tree0cb31934ea674ea3b8bb23dd118db803b319fe7c /src/order_cmd.cpp
parent39e8783f4b8d24a27d28f99905acf8f54dec24fa (diff)
downloadopenttd-b6933a2ebdf66c5fb23b2226d3ce07d71426d7d2.tar.xz
Codechange: Move command arguments to the back of the DoCommand function call.
Diffstat (limited to 'src/order_cmd.cpp')
-rw-r--r--src/order_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp
index f282ca12b..b681b6379 100644
--- a/src/order_cmd.cpp
+++ b/src/order_cmd.cpp
@@ -2036,7 +2036,7 @@ bool UpdateOrderDest(Vehicle *v, const Order *order, int conditional_depth, bool
v->current_order.MakeGoToDepot(destination, v->current_order.GetDepotOrderType(), v->current_order.GetNonStopType(), (OrderDepotActionFlags)(v->current_order.GetDepotActionType() & ~ODATFB_NEAREST_DEPOT), v->current_order.GetRefitCargo());
/* 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(DC_EXEC, CMD_REVERSE_TRAIN_DIRECTION, v->tile, v->index, 0);
if (v->type == VEH_AIRCRAFT) {
Aircraft *a = Aircraft::From(v);