Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Newgrf Waypoints triggering assertions #2996

Closed
DorpsGek opened this issue Jun 26, 2009 · 3 comments
Closed

Newgrf Waypoints triggering assertions #2996

DorpsGek opened this issue Jun 26, 2009 · 3 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

frosch opened the ticket and wrote:

Various functions in newgrf_station cannot handle waypoints in some cases.
E.g. StationGetRandomBits and GetStationAnimationFrame in StationGetVariable

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/2996
@DorpsGek
Copy link
Member Author

DorpsGek commented Jul 1, 2009

Rubidium wrote:

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.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/2996#comment6285

@DorpsGek
Copy link
Member Author

DorpsGek commented Jul 3, 2009

Rubidium wrote:

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.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2996#comment6290

@DorpsGek
Copy link
Member Author

Rubidium closed the ticket.

Reason for closing: Fixed

In r16909


This comment was imported from FlySpray: https://bugs.openttd.org/task/2996

@DorpsGek DorpsGek added flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) NewStations labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant