diff options
author | terkhen <terkhen@openttd.org> | 2010-09-18 20:36:13 +0000 |
---|---|---|
committer | terkhen <terkhen@openttd.org> | 2010-09-18 20:36:13 +0000 |
commit | 9ecf69684e9f1b946551abf3d54dda63f7e8b556 (patch) | |
tree | 7a0b2b13a6920197756a25a61a84194d58cc9651 | |
parent | 3607c33b4f884243e254d5101f7c91bbd1895aa6 (diff) | |
download | openttd-9ecf69684e9f1b946551abf3d54dda63f7e8b556.tar.xz |
(svn r20826) -Codechange: Simplify code for generating more trees above the snowline.
-rw-r--r-- | src/tree_cmd.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/tree_cmd.cpp b/src/tree_cmd.cpp index bc94b1fed..243eb6230 100644 --- a/src/tree_cmd.cpp +++ b/src/tree_cmd.cpp @@ -276,13 +276,9 @@ void PlaceTreesRandomly() ht = GetTileZ(tile); /* The higher we get, the more trees we plant */ j = GetTileZ(tile) / TILE_HEIGHT * 2; + /* Above snowline more trees! */ + if (_settings_game.game_creation.landscape == LT_ARCTIC && ht > GetSnowLine()) j *= 3; while (j--) { - /* Above snowline more trees! */ - if (_settings_game.game_creation.landscape == LT_ARCTIC && ht > GetSnowLine()) { - PlaceTreeAtSameHeight(tile, ht); - PlaceTreeAtSameHeight(tile, ht); - }; - PlaceTreeAtSameHeight(tile, ht); } } |