summaryrefslogtreecommitdiff
path: root/src/tree_gui.cpp
diff options
context:
space:
mode:
authorVít Šefl <vituscze@gmail.com>2021-09-12 08:42:24 +0200
committerGitHub <noreply@github.com>2021-09-12 08:42:24 +0200
commit710b758b81f69a6f6771d7e8741db819831731e6 (patch)
treea6f036b5110f3093c3144d912c4c2ceceefa7074 /src/tree_gui.cpp
parentd4588df9f9f7efd534c73e9170fb51f112bf676f (diff)
downloadopenttd-710b758b81f69a6f6771d7e8741db819831731e6.tar.xz
Fix #9241: Grove and forest tree brushes also create rainforests (#9542)
Diffstat (limited to 'src/tree_gui.cpp')
-rw-r--r--src/tree_gui.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/tree_gui.cpp b/src/tree_gui.cpp
index 3dab92a20..ccec4705d 100644
--- a/src/tree_gui.cpp
+++ b/src/tree_gui.cpp
@@ -29,7 +29,7 @@
#include "safeguards.h"
void PlaceTreesRandomly();
-uint PlaceTreeGroupAroundTile(TileIndex tile, TreeType treetype, uint radius, uint count);
+uint PlaceTreeGroupAroundTile(TileIndex tile, TreeType treetype, uint radius, uint count, bool set_zone);
/** Tree Sprites with their palettes */
const PalSpriteID tree_sprites[] = {
@@ -133,7 +133,8 @@ class BuildTreesWindow : public Window
}
const uint radius = this->mode == PM_FOREST_LG ? 12 : 5;
const uint count = this->mode == PM_FOREST_LG ? 12 : 5;
- PlaceTreeGroupAroundTile(tile, treetype, radius, count);
+ // Create tropic zones only when the tree type is selected by the user and not picked randomly.
+ PlaceTreeGroupAroundTile(tile, treetype, radius, count, this->tree_to_plant != TREE_INVALID);
}
public: