mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-01 20:03: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);
|
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;
|
||||||
|
/* Above snowline more trees! */
|
||||||
|
if (_settings_game.game_creation.landscape == LT_ARCTIC && ht > GetSnowLine()) j *= 3;
|
||||||
while (j--) {
|
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);
|
PlaceTreeAtSameHeight(tile, ht);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user