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

Reset effectiveMissCount when calculating pp #30518

Merged
merged 2 commits into from
Nov 6, 2024

Conversation

Givikap120
Copy link
Contributor

If using one OsuPerformanceCalculator object when calculating 2 different scores - second score can use misscount from first score

For example. First score had 6 misses, so effectiveMissCount starting value will be 6.
If second score has 0 misses, this can happen:

// effectiveMissCount = 6, countMiss = 0
double fullComboThreshold = 200;

if (210 < 200) // not called
    effectiveMissCount = fullComboThreshold / Math.Max(1.0, scoreMaxCombo);
    
effectiveMissCount = Math.Min(effectiveMissCount, totalImperfectHits);
effectiveMissCount = Math.Min(6, 10) = 6;

effectiveMissCount = Math.Max(countMiss, effectiveMissCount);
effectiveMissCount = Math.Max(0, 6) = 6;
// Now effectiveMissCount is 6 when it should be 0

@smoogipoo
Copy link
Contributor

!diffcalc

Copy link

github-actions bot commented Nov 6, 2024

Copy link
Contributor

@smoogipoo smoogipoo left a comment

Choose a reason for hiding this comment

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

It's not really meant to be used this way but sure, I see no harm in this.

@smoogipoo smoogipoo merged commit 9b6d31b into ppy:master Nov 6, 2024
13 checks passed
@Givikap120 Givikap120 deleted the ensure_correct_misscount branch November 6, 2024 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants