summaryrefslogtreecommitdiff
path: root/src/object_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/object_cmd.cpp
parent39e8783f4b8d24a27d28f99905acf8f54dec24fa (diff)
downloadopenttd-b6933a2ebdf66c5fb23b2226d3ce07d71426d7d2.tar.xz
Codechange: Move command arguments to the back of the DoCommand function call.
Diffstat (limited to 'src/object_cmd.cpp')
-rw-r--r--src/object_cmd.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/object_cmd.cpp b/src/object_cmd.cpp
index 7e1e36c1f..328cadd93 100644
--- a/src/object_cmd.cpp
+++ b/src/object_cmd.cpp
@@ -229,7 +229,7 @@ CommandCost CmdBuildObject(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
if (type == OBJECT_OWNED_LAND) {
/* Owned land is special as it can be placed on any slope. */
- cost.AddCost(DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR));
+ cost.AddCost(DoCommand(flags, CMD_LANDSCAPE_CLEAR, tile, 0, 0));
} else {
/* Check the surface to build on. At this time we can't actually execute the
* the CLEAR_TILE commands since the newgrf callback later on can check
@@ -242,7 +242,7 @@ CommandCost CmdBuildObject(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
if (!IsWaterTile(t)) {
/* Normal water tiles don't have to be cleared. For all other tile types clear
* the tile but leave the water. */
- cost.AddCost(DoCommand(t, 0, 0, flags & ~DC_NO_WATER & ~DC_EXEC, CMD_LANDSCAPE_CLEAR));
+ cost.AddCost(DoCommand(flags & ~DC_NO_WATER & ~DC_EXEC, CMD_LANDSCAPE_CLEAR, t, 0, 0));
} else {
/* Can't build on water owned by another company. */
Owner o = GetTileOwner(t);
@@ -260,7 +260,7 @@ CommandCost CmdBuildObject(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
IsTileType(t, MP_OBJECT) &&
IsTileOwner(t, _current_company) &&
IsObjectType(t, OBJECT_HQ))) {
- cost.AddCost(DoCommand(t, 0, 0, flags & ~DC_EXEC, CMD_LANDSCAPE_CLEAR));
+ cost.AddCost(DoCommand(flags & ~DC_EXEC, CMD_LANDSCAPE_CLEAR, t, 0, 0));
}
}
}
@@ -292,10 +292,10 @@ CommandCost CmdBuildObject(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
for (TileIndex t : ta) {
if (HasTileWaterGround(t)) {
if (!IsWaterTile(t)) {
- DoCommand(t, 0, 0, (flags & ~DC_NO_WATER) | DC_NO_MODIFY_TOWN_RATING, CMD_LANDSCAPE_CLEAR);
+ DoCommand((flags & ~DC_NO_WATER) | DC_NO_MODIFY_TOWN_RATING, CMD_LANDSCAPE_CLEAR, t, 0, 0);
}
} else {
- DoCommand(t, 0, 0, flags | DC_NO_MODIFY_TOWN_RATING, CMD_LANDSCAPE_CLEAR);
+ DoCommand(flags | DC_NO_MODIFY_TOWN_RATING, CMD_LANDSCAPE_CLEAR, t, 0, 0);
}
}
}
@@ -847,7 +847,7 @@ static CommandCost TerraformTile_Object(TileIndex tile, DoCommandFlag flags, int
}
}
- return DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
+ return DoCommand(flags, CMD_LANDSCAPE_CLEAR, tile, 0, 0);
}
extern const TileTypeProcs _tile_type_object_procs = {