Set tree water class for old savegames for chunnel support
This commit is contained in:
@@ -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 */
|
||||
|
@@ -88,7 +88,7 @@ const SlxiSubChunkInfo _sl_xv_sub_chunk_infos[] = {
|
||||
{ XSLFI_EXTENDED_GAMELOG, XSCF_NULL, 1, 1, "extended_gamelog", NULL, NULL, NULL },
|
||||
{ XSLFI_STATION_CATCHMENT_INC, XSCF_NULL, 1, 1, "station_catchment_inc", NULL, NULL, NULL },
|
||||
{ XSLFI_CUSTOM_BRIDGE_HEADS, XSCF_NULL, 2, 2, "custom_bridge_heads", NULL, NULL, NULL },
|
||||
{ XSLFI_CHUNNEL, XSCF_NULL, 1, 1, "chunnel", NULL, NULL, "TUNN" },
|
||||
{ XSLFI_CHUNNEL, XSCF_NULL, 2, 2, "chunnel", NULL, NULL, "TUNN" },
|
||||
{ XSLFI_SCHEDULED_DISPATCH, XSCF_NULL, 1, 1, "scheduled_dispatch", NULL, NULL, NULL },
|
||||
{ XSLFI_MORE_TOWN_GROWTH_RATES, XSCF_NULL, 1, 1, "more_town_growth_rates", NULL, NULL, NULL },
|
||||
{ XSLFI_MULTIPLE_DOCKS, XSCF_NULL, 1, 1, "multiple_docks", NULL, NULL, "DOCK" },
|
||||
|
Reference in New Issue
Block a user