summaryrefslogtreecommitdiff
path: root/src/terraform_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/terraform_cmd.cpp
parent39e8783f4b8d24a27d28f99905acf8f54dec24fa (diff)
downloadopenttd-b6933a2ebdf66c5fb23b2226d3ce07d71426d7d2.tar.xz
Codechange: Move command arguments to the back of the DoCommand function call.
Diffstat (limited to 'src/terraform_cmd.cpp')
-rw-r--r--src/terraform_cmd.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/terraform_cmd.cpp b/src/terraform_cmd.cpp
index eaed9e71c..205a36416 100644
--- a/src/terraform_cmd.cpp
+++ b/src/terraform_cmd.cpp
@@ -289,7 +289,7 @@ CommandCost CmdTerraformLand(TileIndex tile, DoCommandFlag flags, uint32 p1, uin
}
CommandCost cost;
if (indirectly_cleared) {
- cost = DoCommand(t, 0, 0, tile_flags, CMD_LANDSCAPE_CLEAR);
+ cost = DoCommand(tile_flags, CMD_LANDSCAPE_CLEAR, t, 0, 0);
} else {
cost = _tile_type_procs[GetTileType(t)]->terraform_tile_proc(t, tile_flags, z_min, tileh);
}
@@ -378,7 +378,7 @@ CommandCost CmdLevelLand(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
TileIndex t = *iter;
uint curh = TileHeight(t);
while (curh != h) {
- CommandCost ret = DoCommand(t, SLOPE_N, (curh > h) ? 0 : 1, flags & ~DC_EXEC, CMD_TERRAFORM_LAND);
+ CommandCost ret = DoCommand(flags & ~DC_EXEC, CMD_TERRAFORM_LAND, t, SLOPE_N, (curh > h) ? 0 : 1);
if (ret.Failed()) {
last_error = ret;
@@ -394,7 +394,7 @@ CommandCost CmdLevelLand(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
delete iter;
return cost;
}
- DoCommand(t, SLOPE_N, (curh > h) ? 0 : 1, flags, CMD_TERRAFORM_LAND);
+ DoCommand(flags, CMD_TERRAFORM_LAND, t, SLOPE_N, (curh > h) ? 0 : 1);
} else {
/* When we're at the terraform limit we better bail (unneeded) testing as well.
* This will probably cause the terraforming cost to be underestimated, but only