summaryrefslogtreecommitdiff
path: root/src/tree_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tree_cmd.cpp')
-rw-r--r--src/tree_cmd.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tree_cmd.cpp b/src/tree_cmd.cpp
index bd112f31b..d0fe4b157 100644
--- a/src/tree_cmd.cpp
+++ b/src/tree_cmd.cpp
@@ -191,7 +191,7 @@ static void PlaceTree(TileIndex tile, uint32 r)
static void PlaceTreeGroups(uint num_groups)
{
do {
- TileIndex center_tile = RandomTile();
+ TileIndex center_tile = TopTile(RandomTile());
for (uint i = 0; i < DEFAULT_TREE_STEPS; i++) {
uint32 r = Random();
@@ -256,7 +256,7 @@ void PlaceTreesRandomly()
if (_game_mode == GM_EDITOR) i /= EDITOR_TREE_DIV;
do {
uint32 r = Random();
- TileIndex tile = RandomTileSeed(r);
+ TileIndex tile = TopTile(RandomTileSeed(r));
IncreaseGeneratingWorldProgress(GWP_TREE);
@@ -285,7 +285,7 @@ void PlaceTreesRandomly()
do {
uint32 r = Random();
- TileIndex tile = RandomTileSeed(r);
+ TileIndex tile = TopTile(RandomTileSeed(r));
IncreaseGeneratingWorldProgress(GWP_TREE);
@@ -852,7 +852,7 @@ void OnTick_Trees()
/* place a tree at a random rainforest spot */
if (_settings_game.game_creation.landscape == LT_TROPIC) {
for (uint c = ScaleByMapSize(1); c > 0; c--) {
- if ((r = Random(), tile = RandomTileSeed(r), GetTropicZone(tile) == TROPICZONE_RAINFOREST) &&
+ if ((r = Random(), tile = TopTile(RandomTileSeed(r)), GetTropicZone(tile) == TROPICZONE_RAINFOREST) &&
CanPlantTreesOnTile(tile, false) &&
(tree = GetRandomTreeType(tile, GB(r, 24, 8))) != TREE_INVALID) {
PlantTreesOnTile(tile, tree, 0, 0);
@@ -864,7 +864,7 @@ void OnTick_Trees()
/* place a tree at a random spot */
r = Random();
- tile = RandomTileSeed(r);
+ tile = TopTile(RandomTileSeed(r));
if (CanPlantTreesOnTile(tile, false) && (tree = GetRandomTreeType(tile, GB(r, 24, 8))) != TREE_INVALID) {
PlantTreesOnTile(tile, tree, 0, 0);
}