mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-01 11:59:26 +00:00
(svn r20826) -Codechange: Simplify code for generating more trees above the snowline.
This commit is contained in:
parent
3607c33b4f
commit
9ecf69684e
@ -276,13 +276,9 @@ void PlaceTreesRandomly()
|
||||
ht = GetTileZ(tile);
|
||||
/* The higher we get, the more trees we plant */
|
||||
j = GetTileZ(tile) / TILE_HEIGHT * 2;
|
||||
while (j--) {
|
||||
/* Above snowline more trees! */
|
||||
if (_settings_game.game_creation.landscape == LT_ARCTIC && ht > GetSnowLine()) {
|
||||
PlaceTreeAtSameHeight(tile, ht);
|
||||
PlaceTreeAtSameHeight(tile, ht);
|
||||
};
|
||||
|
||||
if (_settings_game.game_creation.landscape == LT_ARCTIC && ht > GetSnowLine()) j *= 3;
|
||||
while (j--) {
|
||||
PlaceTreeAtSameHeight(tile, ht);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user