Set tree water class for old savegames for chunnel support

This commit is contained in:
Jonathan G Rennison
2019-03-04 01:19:12 +00:00
parent 7ff252c58d
commit 718554d255
2 changed files with 9 additions and 1 deletions

View File

@@ -3632,6 +3632,14 @@ bool AfterLoadGame()
}
}
if (!SlXvIsFeaturePresent(XSLFI_CHUNNEL, 2)) {
for (TileIndex t = 0; t < map_size; t++) {
if (IsTileType(t, MP_TREES)) {
SetWaterClass(t, GetTreeDensity(t) == TREE_GROUND_SHORE ? WATER_CLASS_SEA : WATER_CLASS_INVALID);
}
}
}
if (SlXvIsFeatureMissing(XSLFI_SAVEGAME_UNIQUE_ID)) {
/* Generate a random id for savegames that didn't have one */
/* We keep id 0 for old savegames that don't have an id */