Use score.MaximumStatistics
in places which assume the entire beatmap was played
#32137
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.
totalPlayableHits
is a new field which usesMaximumStatistics
to sum the amount of hits in the beatmap, regardless of how far into the beatmap the given score was. My assumption is that usingIsBasic
is good enough to get what is effectively a sum of the circles, sliders and spinners in a beatmap - based on reading that appears to be true, but please scrutinise this line of code.This allows for a proper fix of what was attempted in #31741 as it prevents the cases where these variables could go negative, rather than just pushing them to zero if it happened.
My logic for where I kept
totalHits
was that those places are better using the hits in the score thus far - miss penalty, length bonus etc. all make sense to react to the amount of hits the score actually achieved rather than what's in the beatmap.Testing against the replay provided in the attached PR still gives zero with the relevant guards removed due to these changes, and I'll run a sheet to confirm that this doesn't affect submitted plays. PP counter in-game also appears to progress as expected.