diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp index b852c48009..1791870e0a 100644 --- a/src/saveload/afterload.cpp +++ b/src/saveload/afterload.cpp @@ -2030,7 +2030,7 @@ bool AfterLoadGame() } /* Tunnel pool has to be initiated before reservations. */ - if (IsSavegameVersionBefore(196)) { + if (SlXvIsFeatureMissing(XSLFI_CHUNNEL)) { for (TileIndex t = 0; t < map_size; t++) { if (IsTunnelTile(t)) { DiagDirection dir = GetTunnelBridgeDirection(t); diff --git a/src/saveload/extended_ver_sl.cpp b/src/saveload/extended_ver_sl.cpp index 3480e15c5e..8384f95857 100644 --- a/src/saveload/extended_ver_sl.cpp +++ b/src/saveload/extended_ver_sl.cpp @@ -74,6 +74,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, 1, 1, "custom_bridge_heads", NULL, NULL, NULL }, + { XSLFI_CHUNNEL, XSCF_NULL, 1, 1, "chunnel", NULL, NULL, "TUNN" }, { XSLFI_NULL, XSCF_NULL, 0, 0, NULL, NULL, NULL, NULL },// This is the end marker }; diff --git a/src/saveload/extended_ver_sl.h b/src/saveload/extended_ver_sl.h index 36a82104f6..835410010d 100644 --- a/src/saveload/extended_ver_sl.h +++ b/src/saveload/extended_ver_sl.h @@ -48,6 +48,7 @@ enum SlXvFeatureIndex { XSLFI_EXTENDED_GAMELOG, ///< Extended gamelog XSLFI_STATION_CATCHMENT_INC, ///< Station catchment radius increase XSLFI_CUSTOM_BRIDGE_HEADS, ///< Custom bridge heads + XSLFI_CHUNNEL, ///< Tunnels under water (channel tunnel) XSLFI_RIFF_HEADER_60_BIT, ///< Size field in RIFF chunk header is 60 bit XSLFI_HEIGHT_8_BIT, ///< Map tile height is 8 bit instead of 4 bit, but savegame version may be before this became true in trunk diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp index 3376d074b8..0e25fdefd2 100644 --- a/src/saveload/saveload.cpp +++ b/src/saveload/saveload.cpp @@ -270,7 +270,7 @@ * 194 26881 1.5.x, 1.6.0 * 195 27572 1.6.x */ -extern const uint16 SAVEGAME_VERSION = 196; ///< Current savegame version of OpenTTD. +extern const uint16 SAVEGAME_VERSION = 195; ///< Current savegame version of OpenTTD. const uint16 SAVEGAME_VERSION_EXT = 0x8000; ///< Savegame extension indicator mask SavegameType _savegame_type; ///< type of savegame we are loading diff --git a/src/saveload/tunnel_sl.cpp b/src/saveload/tunnel_sl.cpp index f477ef6e7b..310b25a0b2 100644 --- a/src/saveload/tunnel_sl.cpp +++ b/src/saveload/tunnel_sl.cpp @@ -18,9 +18,9 @@ static const SaveLoad _tunnel_desc[] = { - SLE_CONDVAR(Tunnel, tile_n, SLE_UINT32, 196, SL_MAX_VERSION), - SLE_CONDVAR(Tunnel, tile_s, SLE_UINT32, 196, SL_MAX_VERSION), - SLE_CONDVAR(Tunnel, is_chunnel, SLE_BOOL, 196, SL_MAX_VERSION), + SLE_CONDVAR(Tunnel, tile_n, SLE_UINT32, 0, SL_MAX_VERSION), + SLE_CONDVAR(Tunnel, tile_s, SLE_UINT32, 0, SL_MAX_VERSION), + SLE_CONDVAR(Tunnel, is_chunnel, SLE_BOOL, 0, SL_MAX_VERSION), SLE_END() };