1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-09 21:12:55 +08:00

Make length bonus account for sliders, use proper misscount for classic

This commit is contained in:
Fina 2024-03-21 19:02:36 -07:00
parent 970e45ff24
commit 941c0487a4

View File

@ -23,6 +23,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty
private int countMiss;
private double effectiveMissCount;
private bool SLIDERS_ACC;
public OsuPerformanceCalculator()
: base(new OsuRuleset())
@ -33,13 +34,15 @@ namespace osu.Game.Rulesets.Osu.Difficulty
{
var osuAttributes = (OsuDifficultyAttributes)attributes;
SLIDERS_ACC = !score.Mods.Any(m => m is OsuModClassic);
accuracy = score.Accuracy;
scoreMaxCombo = score.MaxCombo;
countGreat = score.Statistics.GetValueOrDefault(HitResult.Great);
countOk = score.Statistics.GetValueOrDefault(HitResult.Ok);
countMeh = score.Statistics.GetValueOrDefault(HitResult.Meh);
countMiss = score.Statistics.GetValueOrDefault(HitResult.Miss);
effectiveMissCount = calculateEffectiveMissCount(osuAttributes);
effectiveMissCount = SLIDERS_ACC ? countMiss : calculateEffectiveMissCount(osuAttributes);
double multiplier = PERFORMANCE_BASE_MULTIPLIER;
@ -191,7 +194,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty
// This percentage only considers HitCircles of any value - in this part of the calculation we focus on hitting the timing hit window.
double betterAccuracyPercentage;
int amountHitObjectsWithAccuracy = attributes.HitCircleCount;
int amountHitObjectsWithAccuracy = SLIDERS_ACC ? attributes.HitCircleCount + attributes.SliderCount : attributes.HitCircleCount;
if (amountHitObjectsWithAccuracy > 0)
betterAccuracyPercentage = ((countGreat - (totalHits - amountHitObjectsWithAccuracy)) * 6 + countOk * 2 + countMeh) / (double)(amountHitObjectsWithAccuracy * 6);