Cache highest snowline value

This commit is contained in:
Jonathan G Rennison
2022-04-29 17:10:18 +01:00
parent 0ec6f659c2
commit ed30542acf
5 changed files with 26 additions and 16 deletions

View File

@@ -635,6 +635,7 @@ bool AfterLoadGame()
RebuildTownKdtree();
RebuildStationKdtree();
UpdateCachedSnowLine();
UpdateCachedSnowLineBounds();
_viewport_sign_kdtree_valid = false;
@@ -3129,6 +3130,7 @@ bool AfterLoadGame()
if (IsSavegameVersionBefore(SLV_164) && _settings_game.game_creation.snow_line_height >= MIN_SNOWLINE_HEIGHT * TILE_HEIGHT && SlXvIsFeatureMissing(XSLFI_CHILLPP)) {
_settings_game.game_creation.snow_line_height /= TILE_HEIGHT;
UpdateCachedSnowLine();
UpdateCachedSnowLineBounds();
}
if (IsSavegameVersionBefore(SLV_164) && !IsSavegameVersionBefore(SLV_32)) {