Add support for loading ChillPP v8 savegames

This commit is contained in:
Jonathan G Rennison
2020-01-03 00:03:43 +00:00
parent 223d542bf1
commit 4936b3ba51
9 changed files with 119 additions and 45 deletions

View File

@@ -3118,7 +3118,7 @@ bool AfterLoadGame()
}
/* This triggers only when old snow_lines were copied into the snow_line_height. */
if (IsSavegameVersionBefore(SLV_164) && _settings_game.game_creation.snow_line_height >= MIN_SNOWLINE_HEIGHT * TILE_HEIGHT) {
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;
}
@@ -3449,7 +3449,7 @@ bool AfterLoadGame()
_jokerpp_auto_separation.clear();
_jokerpp_non_auto_separation.clear();
}
if (SlXvIsFeaturePresent(XSLFI_CHILLPP)) {
if (SlXvIsFeaturePresent(XSLFI_CHILLPP, SL_CHILLPP_232)) {
for (TileIndex t = 0; t < map_size; t++) {
if (IsTileType(t, MP_RAILWAY) && HasSignals(t)) {
if (GetSignalType(t, TRACK_LOWER) == 7) SetSignalType(t, TRACK_LOWER, SIGTYPE_NORMAL);