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

Fix: reset roadtype/streetcartype info for non-road bridges #8111

Merged
merged 1 commit into from May 6, 2020

Conversation

Yexo
Copy link
Contributor

@Yexo Yexo commented May 4, 2020

Roadtype information in m4/m8 is potentially wrong for all non-road bridges build before the introduction of NRT, even if they've been saved in a later version.

TTD savegames like the one from #8108 demonstrate this. If you use the land area information tile on a rail bridge, it shows road/streetcar type lines that should not be there.
Rail type...
rail speed limit...
Road type: Road
Streetcar type: Road

Not sure how to go about the current "apply fix for everything up to but including the current savegame level" bit. I could bump the savegame version, which is slightly cleaner. Or we could leave this as is and remove the extern/change the if the next time the savegame level gets bumped.

@LordAro LordAro added the backport requested This PR should be backport to current release (RC / stable) label May 4, 2020
Comment on lines 3120 to 3121
extern SaveLoadVersion _sl_version;
if (_sl_version <= SLV_ENDING_YEAR) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't just use IsSavegameVersionBefore(SLV_ENDING_YEAR + 1) ?

@glx22
Copy link
Contributor

glx22 commented May 4, 2020

And now I think about it, #8021 could be redone using the same trick, so maybe it's time to add some kind of IsSavegameVersionUntil()

@Yexo
Copy link
Contributor Author

Yexo commented May 5, 2020

I like IsSavegameVersionUntil(), I'll do that.

@Yexo Yexo merged commit 64278fd into OpenTTD:master May 6, 2020
@Yexo Yexo deleted the tileinfo branch May 6, 2020 20:10
@LordAro LordAro added backported This PR is backported to a current release (RC / stable) and removed backport requested This PR should be backport to current release (RC / stable) labels Jul 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported This PR is backported to a current release (RC / stable)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants