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

[BUGFIX] Ensure the variation used for the next song is valid. #3037

Merged

Conversation

AppleHair
Copy link
Contributor

When playing in story mode, PlayState assumes all the songs use the same variation, which is usually true, but not guaranteed. This PR makes PlayState use the getFirstValidVariation method to find the valid variation instead of using the currentVariation variable, which might not be valid.

When playing in story mode, `PlayState` assumes all the songs use the same variation, which is usually true, but not guaranteed. This PR makes `PlayState` use the `getFirstValidVariation` method to find the valid variation instead of using the `currentVariation` variable, which might not be valid.
@EliteMasterEric EliteMasterEric added the status: pending triage The bug or PR has not been reviewed yet. label Jul 18, 2024
@EliteMasterEric
Copy link
Member

Aside from the fact that Story Mode generally isn't used for variations, the issue here is that if you DO use a variation, then getFirstValidVariation will not be correct as it will try to use the default variation first.

The correct variation should be determined by first checking if the variation+difficulty is valid for that song, and using getFirstValidVariation only if variation+difficulty isn't valid.

@EliteMasterEric EliteMasterEric added this to the 0.5.0 milestone Jul 29, 2024
@EliteMasterEric EliteMasterEric added type: minor bug Involves a minor bug or issue. status: accepted Approved for contribution. If it's not already merged, it may be merged on a private branch. small A small pull request with 10 or fewer changes and removed status: pending triage The bug or PR has not been reviewed yet. labels Jul 29, 2024
@EliteMasterEric EliteMasterEric self-assigned this Jul 29, 2024
@EliteMasterEric EliteMasterEric merged commit 45efd78 into FunkinCrew:develop Sep 16, 2024
@AppleHair AppleHair deleted the bugfix/valid-vari-story-mode branch September 27, 2024 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
small A small pull request with 10 or fewer changes status: accepted Approved for contribution. If it's not already merged, it may be merged on a private branch. type: minor bug Involves a minor bug or issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants