Initial implementation of two rail types per tile

This commit is contained in:
Jonathan G Rennison
2018-12-21 03:27:58 +00:00
parent 8128d027c0
commit 65b9a103ad
24 changed files with 768 additions and 225 deletions

View File

@@ -1410,6 +1410,15 @@ bool AfterLoadGame()
}
}
if (SlXvIsFeatureMissing(XSLFI_DUAL_RAIL_TYPES)) {
/* Introduced dual rail types. */
for (TileIndex t = 0; t < map_size; t++) {
if (IsPlainRailTile(t) || (IsRailTunnelBridgeTile(t) && IsBridge(t))) {
SetSecondaryRailType(t, GetRailType(t));
}
}
}
if (SlXvIsFeaturePresent(XSLFI_SIG_TUNNEL_BRIDGE, 1, 6)) {
/* m2 signal state bit allocation has shrunk */
for (TileIndex t = 0; t < map_size; t++) {
@@ -3308,7 +3317,7 @@ bool AfterLoadGame()
t->grow_counter = TownTicksToGameTicks(t->grow_counter) + t->index % TOWN_GROWTH_TICKS;
}
}
if (IsSavegameVersionBefore(202)) {
/* Make sure added industry cargo slots are cleared */
Industry *i;