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 fdc11a9: Missing sprite count determined on the wrong file #9215

Merged
merged 1 commit into from May 8, 2021

Conversation

rubidium42
Copy link
Contributor

Motivation / Problem

#9039 (comment)

Description

Get the count on the right file. It previously looked at the wrong file.

Limitations

None

Checklist for review

Some things are not automated, and forgotten often. This list is a reminder for the reviewers.

  • The bug fix is important enough to be backported? (label: 'backport requested')
  • This PR affects the save game format? (label 'savegame upgrade')
  • This PR affects the GS/AI API? (label 'needs review: Script API')
    • ai_changelog.hpp, gs_changelog.hpp need updating.
    • The compatibility wrappers (compat_*.nut) need updating.
  • This PR affects the NewGRF API? (label 'needs review: NewGRF')

@rubidium42 rubidium42 changed the title Fix #fdc11a9: Missing sprite count determined on the wrong file Fix fdc11a9: Missing sprite count determined on the wrong file May 8, 2021
@frosch123
Copy link
Member

frosch123 commented May 8, 2021

I don't understand this.
openttd.grf is provided by OpenTTD, and always the same.
The check should be about the "extra" grf provided by the baseset.
Never mind.

@rubidium42
Copy link
Contributor Author

I don't understand this.
openttd.grf is provided by OpenTTD, and always the same.
The check should be about the "extra" grf provided by the baseset.

Welcome to the club. The old code (before fdc11a9) looked at the i'th slot, and the NewGRFs were loaded from the i'th slot. The root (i.e. _grfconfig) is master, so I made a mistake when converting it due to not quite spotting master and extra are assigned in reverse order. So, this PR restores it to the old behavior... And that kind of ought to be right as with the original base set it should not complain as we already provided the sprites, whereas OpenGFX should complain as that did not provide the sprites. But why it works that way, I have no clue.

@rubidium42 rubidium42 merged commit de940b1 into OpenTTD:master May 8, 2021
@rubidium42 rubidium42 deleted the wrong_missing_count branch May 8, 2021 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants