1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-15 18:47:26 +08:00

Use actual sliderends dropped instead of estimating

Score data for non-CL scores includes sliderends dropped, meaning no need to estimate.

CL scores are still estimated.
This commit is contained in:
Fina 2024-03-21 23:15:36 -07:00
parent 970e45ff24
commit 4db6f288d3

View File

@ -21,6 +21,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty
private int countOk;
private int countMeh;
private int countMiss;
private int countSliderEndsDropped;
private double effectiveMissCount;
@ -39,6 +40,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty
countOk = score.Statistics.GetValueOrDefault(HitResult.Ok);
countMeh = score.Statistics.GetValueOrDefault(HitResult.Meh);
countMiss = score.Statistics.GetValueOrDefault(HitResult.Miss);
countSliderEndsDropped = score.Statistics.GetValueOrDefault(HitResult.SmallTickMiss);
effectiveMissCount = calculateEffectiveMissCount(osuAttributes);
double multiplier = PERFORMANCE_BASE_MULTIPLIER;
@ -123,7 +125,11 @@ namespace osu.Game.Rulesets.Osu.Difficulty
if (attributes.SliderCount > 0)
{
double estimateSliderEndsDropped = Math.Clamp(Math.Min(countOk + countMeh + countMiss, attributes.MaxCombo - scoreMaxCombo), 0, estimateDifficultSliders);
double sliderNerfFactor = (1 - attributes.SliderFactor) * Math.Pow(1 - estimateSliderEndsDropped / estimateDifficultSliders, 3) + attributes.SliderFactor;
double sliderNerfFactor = 0;
if (!score.Mods.Any(h => h is OsuModClassic cl && cl.NoSliderHeadAccuracy.Value))
sliderNerfFactor = (1 - attributes.SliderFactor) * Math.Pow(1 - countSliderEndsDropped / estimateDifficultSliders, 3) + attributes.SliderFactor;
else
sliderNerfFactor = (1 - attributes.SliderFactor) * Math.Pow(1 - estimateSliderEndsDropped / estimateDifficultSliders, 3) + attributes.SliderFactor;
aimValue *= sliderNerfFactor;
}