1
0
Fork 0

Fix: Rail station tile flags were not set early enough.

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/13203/head
Peter Nelson 2024-12-27 13:12:02 +00:00
parent 1faf60ae13
commit 75ea449ea1
No known key found for this signature in database
GPG Key ID: 8EF8F0A467DF75ED
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));
}
}
/**