diff options
-rw-r--r-- | src/saveload/map_sl.cpp | 4 | ||||
-rw-r--r-- | src/saveload/saveload.h | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/saveload/map_sl.cpp b/src/saveload/map_sl.cpp index e85313762..29ef2f083 100644 --- a/src/saveload/map_sl.cpp +++ b/src/saveload/map_sl.cpp @@ -27,7 +27,7 @@ static uint32 _layer_count; static const SaveLoad _map_desc[] = { SLEG_CONDVAR("dim_x", _map_dim_x, SLE_UINT32, SLV_6, SL_MAX_VERSION), SLEG_CONDVAR("dim_y", _map_dim_y, SLE_UINT32, SLV_6, SL_MAX_VERSION), - SLEG_CONDVAR("layer_count", _layer_count, SLE_UINT32, SLV_6, SL_MAX_VERSION), + SLEG_CONDVAR("layer_count", _layer_count, SLE_UINT32, SLV_UNDERGROUND, SL_MAX_VERSION), }; struct MAPSChunkHandler : ChunkHandler { @@ -53,6 +53,8 @@ struct MAPSChunkHandler : ChunkHandler { SlGlobList(slt); if (!IsSavegameVersionBefore(SLV_RIFF_TO_ARRAY) && SlIterateArray() != -1) SlErrorCorrupt("Too many MAPS entries"); + if (IsSavegameVersionBefore(SLV_UNDERGROUND)) + _layer_count = 1; AllocateMap(_map_dim_x, _map_dim_y/_layer_count, _layer_count); } diff --git a/src/saveload/saveload.h b/src/saveload/saveload.h index 0d4e0fb98..a8ef3fbe3 100644 --- a/src/saveload/saveload.h +++ b/src/saveload/saveload.h @@ -307,6 +307,7 @@ enum SaveLoadVersion : uint16 { SLV_MULTITILE_DOCKS, ///< 216 PR#7380 Multiple docks per station. SLV_TRADING_AGE, ///< 217 PR#7780 Configurable company trading age. SLV_ENDING_YEAR, ///< 218 PR#7747 v1.10 Configurable ending year. + SLV_UNDERGROUND, ///< 219 Underground levels. SLV_REMOVE_TOWN_CARGO_CACHE, ///< 219 PR#8258 Remove town cargo acceptance and production caches. /* Patchpacks for a while considered it a good idea to jump a few versions |