1
0
Fork 0

Fix: Rail station tile flags were not set early enough. (#13203)

Rail station tile flags now use bits that were (long ago) used to store railtype.

During Afterload, there are some calls that need the state of station tile flags to be correct which were executed before the station tile flags were set.
pull/13204/head
Peter Nelson 2024-12-27 14:27:55 +00:00 committed by GitHub
parent e76cc89255
commit dd87bf9333
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 8 deletions

View File

@ -2920,14 +2920,6 @@ bool AfterLoadGame()
}
}
{
/* Station blocked, wires and pylon flags need to be stored in the map. This is effectively cached data, so no
* version check is necessary. This is done here as the SLV_182 check below needs the blocked status. */
for (const auto t : Map::Iterate()) {
if (HasStationTileRail(t)) SetRailStationTileFlags(t, GetStationSpec(t));
}
}
if (IsSavegameVersionBefore(SLV_182)) {
/* Aircraft acceleration variable was bonkers */
for (Aircraft *v : Aircraft::Iterate()) {

View File

@ -130,6 +130,12 @@ void AfterLoadStations()
StationUpdateCachedTriggers(st);
RoadStopUpdateCachedTriggers(st);
}
/* Station blocked, wires and pylon flags need to be stored in the map. This is effectively cached data, so no
* version check is necessary. */
for (const auto t : Map::Iterate()) {
if (HasStationTileRail(t)) SetRailStationTileFlags(t, GetStationSpec(t));
}
}
/**