From 9ecf69684e9f1b946551abf3d54dda63f7e8b556 Mon Sep 17 00:00:00 2001 From: terkhen Date: Sat, 18 Sep 2010 20:36:13 +0000 Subject: (svn r20826) -Codechange: Simplify code for generating more trees above the snowline. --- src/tree_cmd.cpp | 8 ++------ 1 file 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); } } -- cgit v1.2.3-70-g09d2