diff options
author | Patric Stout <truebrain@openttd.org> | 2021-03-24 14:48:12 +0100 |
---|---|---|
committer | Patric Stout <github@truebrain.nl> | 2021-03-26 12:22:32 +0100 |
commit | cafe4eed6e482149eefe75393ad3a13e0f6e7ffe (patch) | |
tree | cc4188cdc13664f8ecc9750e0500e6e14c8d2d30 /src/tgp.cpp | |
parent | 7a886cb4d4538e8b94a7cbf633705a31a2856b47 (diff) | |
download | openttd-cafe4eed6e482149eefe75393ad3a13e0f6e7ffe.tar.xz |
Feature: setting to indicate snow coverage for arctic climate (replaces snow line height)
Setting the snow coverage (in % of the map) makes a lot more sense
to the human, while still allowing the niche player to set (by
finding the correct %) a snow line height they like. This makes for
easier defaults, as it decoupled terrain height from amount of snow.
Maps can never be 100% snow, as we do not have sprites for coastal
tiles.
Internally, this calculates the best snow line height to approach
this coverage as close as possible.
Diffstat (limited to 'src/tgp.cpp')
-rw-r--r-- | src/tgp.cpp | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/src/tgp.cpp b/src/tgp.cpp index 190499cbc..d47cdecac 100644 --- a/src/tgp.cpp +++ b/src/tgp.cpp @@ -237,14 +237,6 @@ static height_t TGPGetMaxHeight() int map_size_bucket = std::min(MapLogX(), MapLogY()) - MIN_MAP_SIZE_BITS; int max_height_from_table = max_height[_settings_game.difficulty.terrain_type][map_size_bucket]; - /* Arctic needs snow to have all industries, so make sure we allow TGP to generate this high. */ - if (_settings_game.game_creation.landscape == LT_ARCTIC) { - max_height_from_table += _settings_newgame.game_creation.snow_line_height; - /* Make flat a bit more flat by removing "very flat" from it, to somewhat compensate for the increase we just did. */ - if (_settings_game.difficulty.terrain_type > 0) { - max_height_from_table -= max_height[_settings_game.difficulty.terrain_type - 1][map_size_bucket]; - } - } /* Tropic needs tropical forest to have all industries, so make sure we allow TGP to generate this high. * Tropic forest always starts at 1/4th of the max height. */ if (_settings_game.game_creation.landscape == LT_TROPIC) { |