Bump version, set semaphore/pbs/exit sig state on upgrade.
This commit is contained in:
@@ -2968,6 +2968,17 @@ bool AfterLoadGame()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (SlXvIsFeaturePresent(XSLFI_SIG_TUNNEL_BRIDGE, 1, 1)) {
|
||||||
|
/* set the semaphore bit to match what it would have been in v1 */
|
||||||
|
/* clear the PBS bit, update the end signal state */
|
||||||
|
for (TileIndex t = 0; t < map_size; t++) {
|
||||||
|
if (IsTileType(t, MP_TUNNELBRIDGE) && GetTunnelBridgeTransportType(t) == TRANSPORT_RAIL && HasWormholeSignals(t)) {
|
||||||
|
SetTunnelBridgeSemaphore(t, _cur_year < _settings_client.gui.semaphore_build_before);
|
||||||
|
SetTunnelBridgePBS(t, false);
|
||||||
|
UpdateSignalsOnSegment(t, INVALID_DIAGDIR, GetTileOwner(t));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Station acceptance is some kind of cache */
|
/* Station acceptance is some kind of cache */
|
||||||
if (IsSavegameVersionBefore(127)) {
|
if (IsSavegameVersionBefore(127)) {
|
||||||
|
@@ -45,7 +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
|
static const uint32 _sl_xv_slxi_chunk_version = 0; ///< current version os SLXI chunk
|
||||||
|
|
||||||
const SlxiSubChunkInfo _sl_xv_sub_chunk_infos[] = {
|
const SlxiSubChunkInfo _sl_xv_sub_chunk_infos[] = {
|
||||||
{ XSLFI_SIG_TUNNEL_BRIDGE, XSCF_NULL, 1, 1, "signal_tunnel_bridge", NULL, NULL, NULL },
|
{ XSLFI_SIG_TUNNEL_BRIDGE, XSCF_NULL, 2, 2, "signal_tunnel_bridge", NULL, NULL, NULL },
|
||||||
{ XSLFI_NULL, XSCF_NULL, 0, 0, NULL, NULL, NULL, NULL },// This is the end marker
|
{ XSLFI_NULL, XSCF_NULL, 0, 0, NULL, NULL, NULL, NULL },// This is the end marker
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user