summaryrefslogtreecommitdiff
path: root/src/vehicle.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/vehicle.cpp
parent39e8783f4b8d24a27d28f99905acf8f54dec24fa (diff)
downloadopenttd-b6933a2ebdf66c5fb23b2226d3ce07d71426d7d2.tar.xz
Codechange: Move command arguments to the back of the DoCommand function call.
Diffstat (limited to 'src/vehicle.cpp')
-rw-r--r--src/vehicle.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp
index 30e1c477c..1e0cccaad 100644
--- a/src/vehicle.cpp
+++ b/src/vehicle.cpp
@@ -307,7 +307,7 @@ void ShowNewGrfVehicleError(EngineID engine, StringID part1, StringID part2, GRF
SetDParamStr(0, grfconfig->GetName());
SetDParam(1, engine);
ShowErrorMessage(part1, part2, WL_CRITICAL);
- if (!_networking) DoCommand(0, critical ? PM_PAUSED_ERROR : PM_PAUSED_NORMAL, 1, DC_EXEC, CMD_PAUSE);
+ if (!_networking) DoCommand(DC_EXEC, CMD_PAUSE, 0, critical ? PM_PAUSED_ERROR : PM_PAUSED_NORMAL, 1);
}
/* debug output */
@@ -1055,7 +1055,7 @@ void CallVehicleTicks()
const Company *c = Company::Get(_current_company);
SubtractMoneyFromCompany(CommandCost(EXPENSES_NEW_VEHICLES, (Money)c->settings.engine_renew_money));
- CommandCost res = DoCommand(0, v->index, 0, DC_EXEC, CMD_AUTOREPLACE_VEHICLE);
+ CommandCost res = DoCommand(DC_EXEC, CMD_AUTOREPLACE_VEHICLE, 0, v->index, 0);
SubtractMoneyFromCompany(CommandCost(EXPENSES_NEW_VEHICLES, -(Money)c->settings.engine_renew_money));
if (!IsLocalCompany()) continue;
@@ -1561,7 +1561,7 @@ void VehicleEnterDepot(Vehicle *v)
if (v->current_order.IsRefit()) {
Backup<CompanyID> cur_company(_current_company, v->owner, FILE_LINE);
- CommandCost cost = DoCommand(v->tile, v->index, v->current_order.GetRefitCargo() | 0xFF << 8, DC_EXEC, GetCmdRefitVeh(v));
+ CommandCost cost = DoCommand(DC_EXEC, GetCmdRefitVeh(v), v->tile, v->index, v->current_order.GetRefitCargo() | 0xFF << 8);
cur_company.Restore();
if (cost.Failed()) {
@@ -2443,7 +2443,7 @@ CommandCost Vehicle::SendToDepot(DoCommandFlag flags, DepotCommand command)
/* If there is no depot in front and the train is not already reversing, reverse automatically (trains only) */
if (this->type == VEH_TRAIN && (reverse ^ HasBit(Train::From(this)->flags, VRF_REVERSING))) {
- DoCommand(this->tile, this->index, 0, DC_EXEC, CMD_REVERSE_TRAIN_DIRECTION);
+ DoCommand(DC_EXEC, CMD_REVERSE_TRAIN_DIRECTION, this->tile, this->index, 0);
}
if (this->type == VEH_AIRCRAFT) {