summaryrefslogtreecommitdiff
path: root/src/industry_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/industry_cmd.cpp')
-rw-r--r--src/industry_cmd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp
index 8e37724a2..a18fc64da 100644
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -2024,7 +2024,7 @@ CommandCost CmdBuildIndustry(DoCommandFlag flags, TileIndex tile, IndustryType i
/* We should not have more than one Random() in a function call
* because parameter evaluation order is not guaranteed in the c++ standard
*/
- tile = RandomTile();
+ tile = TopTile(RandomTile());
/* Start with a random layout */
size_t layout = RandomRange((uint32)num_layouts);
/* Check now each layout, starting with the random one */
@@ -2221,7 +2221,7 @@ static Industry *PlaceIndustry(IndustryType type, IndustryAvailabilityCallType c
{
uint tries = try_hard ? 10000u : 2000u;
for (; tries > 0; tries--) {
- Industry *ind = CreateNewIndustry(RandomTile(), type, creation_type);
+ Industry *ind = CreateNewIndustry(TopTile(RandomTile()), type, creation_type);
if (ind != nullptr) return ind;
}
return nullptr;