Add setting for width of dynamic snowline range for arctic tree placement
Default: 75%
This commit is contained in:
@@ -105,6 +105,8 @@ static bool _is_main_river = false;
|
||||
byte _cached_snowline = 0;
|
||||
byte _cached_highest_snowline = 0;
|
||||
byte _cached_lowest_snowline = 0;
|
||||
byte _cached_tree_placement_highest_snowline = 0;
|
||||
byte _cached_tree_placement_lowest_snowline = 0;
|
||||
|
||||
/**
|
||||
* Map 2D viewport or smallmap coordinate to 3D world or tile coordinate.
|
||||
@@ -687,6 +689,10 @@ void UpdateCachedSnowLineBounds()
|
||||
{
|
||||
_cached_highest_snowline = _snow_line == nullptr ? _settings_game.game_creation.snow_line_height : _snow_line->highest_value;
|
||||
_cached_lowest_snowline = _snow_line == nullptr ? _settings_game.game_creation.snow_line_height : _snow_line->lowest_value;
|
||||
|
||||
uint snowline_delta = (((100 - _settings_game.construction.trees_around_snow_line_dynamic_range) * (HighestSnowLine() - LowestSnowLine())) + 50) / 100;
|
||||
_cached_tree_placement_highest_snowline = HighestSnowLine() - ((snowline_delta + 1) / 2);
|
||||
_cached_tree_placement_lowest_snowline = LowestSnowLine() + (snowline_delta / 2);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user