You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Various functions in newgrf_station cannot handle waypoints in some cases.
E.g. StationGetRandomBits and GetStationAnimationFrame in StationGetVariable
It looks more like lots of newstation stuff isn't applied on waypoints; waypoints can't have a station spec. If it does have a station spec it assumes it's a station etc.
Maybe it's "just" better to make waypoints stations too, possibly with some bit set that they are only waypoints. This way there's no hassle between chosing waypoint/station, waypoints immediately become multi tile and it should remove quite a number of special cases w.r.t. waypoint/station path finding/order handling. It would be quite a massive job, but easier in the end.
Anyhow, already made get/set random bits and animation frame safe... but then I found the station spec stuff and that made me believe that simply adding more ifs is not going to be the solution.
It's not that important for stable releases; the bits they are reading if it's a waypoint tile would be zero-ed unused parts of the map array.
Furthermore assertions are disabled for stable releases making it very unlikely to be triggered in the stable release. Better work on a proper fix than hacking around the problem.
frosch opened the ticket and wrote:
Reported version: trunk
Operating system: All
This issue was imported from FlySpray: https://bugs.openttd.org/task/2996
The text was updated successfully, but these errors were encountered: