summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorterkhen <terkhen@openttd.org>2010-09-18 20:48:40 +0000
committerterkhen <terkhen@openttd.org>2010-09-18 20:48:40 +0000
commit9a7dd400063748c87460747f6a38e25c0236d309 (patch)
tree44044d01fb09031c985cb736c10a80ab68e0cfb6 /src
parentee8272bacc5e6e21de33188d98169e932b76d1e6 (diff)
downloadopenttd-9a7dd400063748c87460747f6a38e25c0236d309.tar.xz
(svn r20829) -Fix [FS#4094]: Place less trees at once when planting random trees at the scenario editor.
Diffstat (limited to 'src')
-rw-r--r--src/tree_cmd.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tree_cmd.cpp b/src/tree_cmd.cpp
index 31d114258..59bebc659 100644
--- a/src/tree_cmd.cpp
+++ b/src/tree_cmd.cpp
@@ -56,6 +56,7 @@ byte _trees_tick_ctr;
static const uint16 DEFAULT_TREE_STEPS = 1000; ///< Default number of attempts for placing trees.
static const uint16 DEFAULT_RAINFOREST_TREE_STEPS = 15000; ///< Default number of attempts for placing extra trees at rainforest in tropic.
+static const uint16 EDITOR_TREE_DIV = 5; ///< Game editor tree generation divisor factor.
/**
* Tests if a tile can be converted to MP_TREES
@@ -249,6 +250,7 @@ void PlaceTreesRandomly()
uint i, j, ht;
i = ScaleByMapSize(DEFAULT_TREE_STEPS);
+ if (_game_mode == GM_EDITOR) i /= EDITOR_TREE_DIV;
do {
uint32 r = Random();
TileIndex tile = RandomTileSeed(r);
@@ -276,6 +278,7 @@ void PlaceTreesRandomly()
/* place extra trees at rainforest area */
if (_settings_game.game_creation.landscape == LT_TROPIC) {
i = ScaleByMapSize(DEFAULT_RAINFOREST_TREE_STEPS);
+ if (_game_mode == GM_EDITOR) i /= EDITOR_TREE_DIV;
do {
uint32 r = Random();