Fix beatmap skin sample lookups falling back to non-custom sample banks if the custom bank sample was not found #33908
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #33900. I think. Stable's sample lookup logic is horrible.
The user in the issue claimed they were hearing
drum-hitfinish2, but they were really hearingdrum-hitfinish, because they're the same.wavfile in the beatmap. Now the reason why they were hearingdrum-hitfinishis that the sample control point was specifying something like:To decipher, this is:
Taking one of the objects affected, namely 00:23:946 (2) - that's a slider with finish addition and drum addition bank on the slider head. The slider head is thus attempting to play
soft-hitnormal4anddrum-hitfinish4.Neither
soft-hitnormal4orsoft-hitnormalexist in the beatmap, so that plays fine via falling back to user skin'ssoft-hitnormal, butdrum-hitfinish4ends up falling back todrum-hitfinishwhich does exist in the beatmap skin and thus plays wrongly from the beatmap skin rather than the user skin.I have no idea how to ensure this is correct across every beatmap and skin out there so my approach is to just spray and pray (and rely on issue reports I guess). I think this matches the stable logic which is nestled within here but honestly even if you put a gun to my head I couldn't be sure if it matches completely in every possible circumstance or not.