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

Callback 10 not run on changing railtype - potential desync. #3978

Closed
DorpsGek opened this issue Jul 26, 2010 · 3 comments
Closed

Callback 10 not run on changing railtype - potential desync. #3978

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

Comments

@DorpsGek
Copy link
Member

Pikka opened the ticket and wrote:

Callback 10 (Powered wagons and visual effects) is not called when a train moves between rail types. This is a potential multiplayer desync issue.

Issue confirmed by Yexo and test grf attached - loco should smoke on non-electrified track and spark on electrified.

Attachments

Reported version: trunk
Operating system: All


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

Pikka wrote:

Additionally, someone in the know might want to update the TTDPatch wiki to say exactly when each vehicle property is updated by callback 36. At the moment it just says "most" do this, while "some" do that; very vague indeed.


This comment was imported from FlySpray: https://bugs.openttd.org/task/3978#comment8399

@DorpsGek
Copy link
Member Author

Rubidium wrote:

Seems to me there is no other solution to this problem than to invalidate the complete vehicle cache. We might "optimise" this a bit by only running this once per tick if it's needed, but that only really matters when crossing a different type of track with a relatively long train.

A (semi) optimisation could be to only look at the from engine for the rail type, but that is probably bound to cause more trouble than it's worth.

NOTE: also update the track conversion method as the UpdatePower thingy has the same issue there. It should probably update it if it's not powered as a NewGRF can use the railtype regardless of its poweredness.


This comment was imported from FlySpray: https://bugs.openttd.org/task/3978#comment8422

@DorpsGek
Copy link
Member Author

frosch closed the ticket.

Reason for closing: Fixed

in r20505 and previous commits


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

@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) 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