Custom bridge heads: Add savegame version and setting.
This commit is contained in:
@@ -2968,6 +2968,14 @@ bool AfterLoadGame()
|
||||
#endif
|
||||
}
|
||||
|
||||
if (SlXvIsFeatureMissing(XSLFI_CUSTOM_BRIDGE_HEADS)) {
|
||||
/* ensure that previously unused custom bridge-head bits are cleared */
|
||||
for (TileIndex t = 0; t < map_size; t++) {
|
||||
if (IsBridgeTile(t) && GetTunnelBridgeTransportType(t) == TRANSPORT_ROAD) {
|
||||
SB(_m[t].m2, 0, 8, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Station acceptance is some kind of cache */
|
||||
if (IsSavegameVersionBefore(127)) {
|
||||
|
@@ -45,6 +45,7 @@ std::vector<uint32> _sl_xv_discardable_chunk_ids; ///< list of chunks
|
||||
static const uint32 _sl_xv_slxi_chunk_version = 0; ///< current version os SLXI chunk
|
||||
|
||||
const SlxiSubChunkInfo _sl_xv_sub_chunk_infos[] = {
|
||||
{ XSLFI_CUSTOM_BRIDGE_HEADS, XSCF_NULL, 1, 1, "custom_bridge_heads", NULL, NULL, NULL },
|
||||
{ XSLFI_NULL, XSCF_NULL, 0, 0, NULL, NULL, NULL, NULL },// This is the end marker
|
||||
};
|
||||
|
||||
|
@@ -21,6 +21,7 @@
|
||||
*/
|
||||
enum SlXvFeatureIndex {
|
||||
XSLFI_NULL = 0, ///< Unused value, to indicate that no extended feature test is in use
|
||||
XSLFI_CUSTOM_BRIDGE_HEADS, ///< Custom bridge heads
|
||||
|
||||
XSLFI_SIZE, ///< Total count of features, including null feature
|
||||
};
|
||||
|
Reference in New Issue
Block a user