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