summaryrefslogtreecommitdiff
path: root/src/object_cmd.cpp
diff options
context:
space:
mode:
authorMichael Lutz <michi@icosahedron.de>2021-10-10 02:08:52 +0200
committerMichael Lutz <michi@icosahedron.de>2021-12-16 22:28:32 +0100
commit7048e1522f7095e7c716c2488d78711ab6ed912c (patch)
treeef0336fbdbfa05cc7a4ca6c065885829abb50fda /src/object_cmd.cpp
parent33ca4f2b9950d98fed902962c847833667ccca9f (diff)
downloadopenttd-7048e1522f7095e7c716c2488d78711ab6ed912c.tar.xz
Codechange: Move flags in CommandProc in front of the command arguments.
Diffstat (limited to 'src/object_cmd.cpp')
-rw-r--r--src/object_cmd.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/object_cmd.cpp b/src/object_cmd.cpp
index f207d4786..b5271727c 100644
--- a/src/object_cmd.cpp
+++ b/src/object_cmd.cpp
@@ -196,14 +196,14 @@ static CommandCost ClearTile_Object(TileIndex tile, DoCommandFlag flags);
/**
* Build an object object
- * @param tile tile where the object will be located
* @param flags type of operation
+ * @param tile tile where the object will be located
* @param p1 the object type to build
* @param p2 the view for the object
* @param text unused
* @return the cost of this operation or an error
*/
-CommandCost CmdBuildObject(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const std::string &text)
+CommandCost CmdBuildObject(DoCommandFlag flags, TileIndex tile, uint32 p1, uint32 p2, const std::string &text)
{
CommandCost cost(EXPENSES_CONSTRUCTION);
@@ -776,7 +776,7 @@ void GenerateObjects()
default:
uint8 view = RandomRange(spec->views);
- if (CmdBuildObject(RandomTile(), DC_EXEC | DC_AUTO | DC_NO_TEST_TOWN_RATING | DC_NO_MODIFY_TOWN_RATING, i, view, {}).Succeeded()) amount--;
+ if (CmdBuildObject(DC_EXEC | DC_AUTO | DC_NO_TEST_TOWN_RATING | DC_NO_MODIFY_TOWN_RATING, RandomTile(), i, view, {}).Succeeded()) amount--;
break;
}
}