Custom bridge heads: Add savegame version and setting.

This commit is contained in:
Jonathan G Rennison
2017-02-05 12:47:34 +00:00
parent 3b45419a16
commit 1f727e9029
7 changed files with 24 additions and 0 deletions

View File

@@ -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)) {