mirror of https://github.com/OpenTTD/OpenTTD
Fix #8021: limit savegame range for docking tiles fixing
parent
64278fd598
commit
bc8333723c
|
@ -3120,6 +3120,14 @@ bool AfterLoadGame()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IsSavegameVersionUntil(SLV_ENDING_YEAR)) {
|
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++) {
|
for (TileIndex t = 0; t < map_size; t++) {
|
||||||
if (IsTileType(t, MP_TUNNELBRIDGE) && GetTunnelBridgeTransportType(t) != TRANSPORT_ROAD) {
|
if (IsTileType(t, MP_TUNNELBRIDGE) && GetTunnelBridgeTransportType(t) != TRANSPORT_ROAD) {
|
||||||
SetRoadTypes(t, INVALID_ROADTYPE, INVALID_ROADTYPE);
|
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. */
|
/* Compute station catchment areas. This is needed here in case UpdateStationAcceptance is called below. */
|
||||||
Station::RecomputeCatchmentForAll();
|
Station::RecomputeCatchmentForAll();
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,6 @@ void AfterLoadVehicles(bool part_of_load);
|
||||||
void FixupTrainLengths();
|
void FixupTrainLengths();
|
||||||
void AfterLoadStations();
|
void AfterLoadStations();
|
||||||
void AfterLoadRoadStops();
|
void AfterLoadRoadStops();
|
||||||
void AfterLoadScanDockingTiles();
|
|
||||||
void ResetLabelMaps();
|
void ResetLabelMaps();
|
||||||
void AfterLoadLabelMaps();
|
void AfterLoadLabelMaps();
|
||||||
void AfterLoadStoryBook();
|
void AfterLoadStoryBook();
|
||||||
|
|
|
@ -141,17 +141,6 @@ void AfterLoadRoadStops()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* (Re)scan for station docking tiles after loading a savegame.
|
|
||||||
*/
|
|
||||||
void AfterLoadScanDockingTiles()
|
|
||||||
{
|
|
||||||
/* Scan for docking tiles */
|
|
||||||
for (Station *st : Station::Iterate()) {
|
|
||||||
if (st->ship_station.tile != INVALID_TILE) UpdateStationDockingTiles(st);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static const SaveLoad _roadstop_desc[] = {
|
static const SaveLoad _roadstop_desc[] = {
|
||||||
SLE_VAR(RoadStop, xy, SLE_UINT32),
|
SLE_VAR(RoadStop, xy, SLE_UINT32),
|
||||||
SLE_CONDNULL(1, SL_MIN_VERSION, SLV_45),
|
SLE_CONDNULL(1, SL_MIN_VERSION, SLV_45),
|
||||||
|
|
Loading…
Reference in New Issue