mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-20 04:59:11 +00:00
Codechange: Template DoCommand to automagically reflect the parameters of the command proc.
When finished, this will allow each command handler to take individually different parameters, obliviating the need for bit-packing.
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
#include "order_backup.h"
|
||||
#include "cheat_type.h"
|
||||
#include "order_cmd.h"
|
||||
#include "train_cmd.h"
|
||||
|
||||
#include "table/strings.h"
|
||||
|
||||
@@ -2037,7 +2038,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(DC_EXEC, CMD_REVERSE_TRAIN_DIRECTION, v->tile, v->index, 0);
|
||||
if (v->type == VEH_TRAIN && reverse) Command<CMD_REVERSE_TRAIN_DIRECTION>::Do(DC_EXEC, v->tile, v->index, 0, {});
|
||||
|
||||
if (v->type == VEH_AIRCRAFT) {
|
||||
Aircraft *a = Aircraft::From(v);
|
||||
|
Reference in New Issue
Block a user