Use separate bits for signals on bridge/tunnel entrance/exit red/green states
This commit is contained in:
@@ -2989,7 +2989,7 @@ bool AfterLoadGame()
|
||||
/* signalled tunnel entrance */
|
||||
SignalState state = HasBit(_m[t].m5, 6) ? SIGNAL_STATE_RED : SIGNAL_STATE_GREEN;
|
||||
ClrBit(_m[t].m5, 6);
|
||||
SetTunnelBridgeSignalState(t, state);
|
||||
SetTunnelBridgeEntranceSignalState(t, state);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3005,6 +3005,14 @@ bool AfterLoadGame()
|
||||
}
|
||||
}
|
||||
}
|
||||
if (SlXvIsFeaturePresent(XSLFI_SIG_TUNNEL_BRIDGE, 1, 5)) {
|
||||
/* entrance and exit signal red/green states now have separate bits */
|
||||
for (TileIndex t = 0; t < map_size; t++) {
|
||||
if (IsTileType(t, MP_TUNNELBRIDGE) && GetTunnelBridgeTransportType(t) == TRANSPORT_RAIL && IsTunnelBridgeSignalSimulationExit(t)) {
|
||||
SetTunnelBridgeExitSignalState(t, HasBit(_me[t].m6, 0) ? SIGNAL_STATE_GREEN : SIGNAL_STATE_RED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Station acceptance is some kind of cache */
|
||||
if (IsSavegameVersionBefore(127)) {
|
||||
|
Reference in New Issue
Block a user