summaryrefslogtreecommitdiff
path: root/src/clear_cmd.cpp
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2020-05-13 21:29:54 +0200
committerErich Eckner <git@eckner.net>2022-01-16 21:58:17 +0100
commit68e1c45522d182e1496e2a99a27d986d4bb784ae (patch)
tree40ec506010429c491cf84227d205bf3d7ede60f1 /src/clear_cmd.cpp
parent7cc0d7daf14ed1c893d9dc35f634b25ccbbcebbf (diff)
downloadopenttd-68e1c45522d182e1496e2a99a27d986d4bb784ae.tar.xz
RandomTile() and RandomTileSeed() should use the TopTile() most of the time (always?)
Diffstat (limited to 'src/clear_cmd.cpp')
-rw-r--r--src/clear_cmd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/clear_cmd.cpp b/src/clear_cmd.cpp
index 98a53b7ba..e532fa529 100644
--- a/src/clear_cmd.cpp
+++ b/src/clear_cmd.cpp
@@ -346,7 +346,7 @@ void GenerateClearTile()
SetGeneratingWorldProgress(GWP_ROUGH_ROCKY, gi + i);
do {
IncreaseGeneratingWorldProgress(GWP_ROUGH_ROCKY);
- tile = RandomTile();
+ tile = TopTile(RandomTile());
if (IsTileType(tile, MP_CLEAR) && !IsClearGround(tile, CLEAR_DESERT)) SetClearGroundDensity(tile, CLEAR_ROUGH, 3);
} while (--i);
@@ -354,7 +354,7 @@ void GenerateClearTile()
i = gi;
do {
uint32 r = Random();
- tile = RandomTileSeed(r);
+ tile = TopTile(RandomTileSeed(r));
IncreaseGeneratingWorldProgress(GWP_ROUGH_ROCKY);
if (IsTileType(tile, MP_CLEAR) && !IsClearGround(tile, CLEAR_DESERT)) {