1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:17:23 +08:00

Fix score rounding issue

This commit is contained in:
maromalo 2022-11-08 01:10:21 -03:00
parent 8eef2ba8de
commit 64e6276397

View File

@ -341,13 +341,13 @@ namespace osu.Game.Rulesets.Scoring
case ScoringMode.Standardised:
double accuracyScore = accuracyPortion * accuracyRatio;
double comboScore = comboPortion * comboRatio;
return (long)((max_score * (accuracyScore + comboScore) + bonusScore) * scoreMultiplier);
return (long)Math.Round((max_score * (accuracyScore + comboScore) + bonusScore) * scoreMultiplier);
case ScoringMode.Classic:
// This gives a similar feeling to osu!stable scoring (ScoreV1) while keeping classic scoring as only a constant multiple of standardised scoring.
// The invariant is important to ensure that scores don't get re-ordered on leaderboards between the two scoring modes.
double scaledStandardised = ComputeScore(ScoringMode.Standardised, accuracyRatio, comboRatio, bonusScore, totalBasicHitObjects) / max_score;
return (long)(Math.Pow(scaledStandardised * Math.Max(1, totalBasicHitObjects), 2) * ClassicScoreMultiplier);
return (long)Math.Round(Math.Pow(scaledStandardised * Math.Max(1, totalBasicHitObjects), 2) * ClassicScoreMultiplier);
}
}