Merge branch 'signal_tunnels_bridges' into jgrpp
# Conflicts: # projects/openttd_vs100.vcxproj # projects/openttd_vs100.vcxproj.filters # projects/openttd_vs140.vcxproj # projects/openttd_vs140.vcxproj.filters # projects/openttd_vs80.vcproj # projects/openttd_vs90.vcproj # source.list # src/misc.cpp # src/openttd.cpp # src/pbs.cpp # src/saveload/extended_ver_sl.cpp # src/saveload/saveload.cpp # src/signal.cpp # src/train_cmd.cpp # src/tunnelbridge_map.h
This commit is contained in:
@@ -3245,13 +3245,28 @@ bool AfterLoadGame()
|
||||
/* 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)) {
|
||||
if (IsTileType(t, MP_TUNNELBRIDGE) && GetTunnelBridgeTransportType(t) == TRANSPORT_RAIL && IsTunnelBridgeWithSignalSimulation(t)) {
|
||||
SetTunnelBridgeSemaphore(t, _cur_year < _settings_client.gui.semaphore_build_before);
|
||||
SetTunnelBridgePBS(t, false);
|
||||
UpdateSignalsOnSegment(t, INVALID_DIAGDIR, GetTileOwner(t));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (SlXvIsFeaturePresent(XSLFI_SIG_TUNNEL_BRIDGE, 1, 2)) {
|
||||
/* red/green signal state bit for tunnel entrances moved
|
||||
* to no longer re-use signalled tunnel exit bit
|
||||
*/
|
||||
for (TileIndex t = 0; t < map_size; t++) {
|
||||
if (IsTileType(t, MP_TUNNELBRIDGE) && GetTunnelBridgeTransportType(t) == TRANSPORT_RAIL && IsTunnelBridgeWithSignalSimulation(t)) {
|
||||
if (HasBit(_m[t].m5, 5)) {
|
||||
/* signalled tunnel entrance */
|
||||
SignalState state = HasBit(_m[t].m5, 6) ? SIGNAL_STATE_RED : SIGNAL_STATE_GREEN;
|
||||
ClrBit(_m[t].m5, 6);
|
||||
SetTunnelBridgeSignalState(t, state);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Station acceptance is some kind of cache */
|
||||
if (IsSavegameVersionBefore(127)) {
|
||||
|
Reference in New Issue
Block a user