Move dual-use of load_unload_ticks for bridge/tun signals to new field

This commit is contained in:
Jonathan G Rennison
2018-03-26 18:40:05 +01:00
parent 38cb80872b
commit def3a3933b
5 changed files with 21 additions and 7 deletions

View File

@@ -2994,6 +2994,17 @@ bool AfterLoadGame()
}
}
}
if (SlXvIsFeaturePresent(XSLFI_SIG_TUNNEL_BRIDGE, 1, 4)) {
/* load_unload_ticks --> tunnel_bridge_signal_num */
Train *t;
FOR_ALL_TRAINS(t) {
TileIndex tile = t->tile;
if (IsTileType(tile, MP_TUNNELBRIDGE) && GetTunnelBridgeTransportType(tile) == TRANSPORT_RAIL && IsTunnelBridgeWithSignalSimulation(tile)) {
t->tunnel_bridge_signal_num = t->load_unload_ticks;
t->load_unload_ticks = 0;
}
}
}
/* Station acceptance is some kind of cache */
if (IsSavegameVersionBefore(127)) {