Fix #8021: limit savegame range for docking tiles fixing

This commit is contained in:
glx
2020-05-06 22:44:47 +02:00
committed by glx22
parent 64278fd598
commit bc8333723c
3 changed files with 8 additions and 15 deletions

View File

@@ -3120,6 +3120,14 @@ bool AfterLoadGame()
}
if (IsSavegameVersionUntil(SLV_ENDING_YEAR)) {
/* Update station docking tiles. Was only needed for pre-SLV_MULTITLE_DOCKS
* savegames, but a bug in docking tiles touched all savegames between
* SLV_MULTITILE_DOCKS and SLV_ENDING_YEAR. */
for (Station *st : Station::Iterate()) {
if (st->ship_station.tile != INVALID_TILE) UpdateStationDockingTiles(st);
}
/* Reset roadtype/streetcartype info for non-road bridges. */
for (TileIndex t = 0; t < map_size; t++) {
if (IsTileType(t, MP_TUNNELBRIDGE) && GetTunnelBridgeTransportType(t) != TRANSPORT_ROAD) {
SetRoadTypes(t, INVALID_ROADTYPE, INVALID_ROADTYPE);
@@ -3127,9 +3135,6 @@ bool AfterLoadGame()
}
}
/* Update station docking tiles. */
AfterLoadScanDockingTiles();
/* Compute station catchment areas. This is needed here in case UpdateStationAcceptance is called below. */
Station::RecomputeCatchmentForAll();