1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-11 01:13:00 +08:00

Merge pull request #2 from Finadoggie/dropped-tail-fix

Use actual sliderends dropped instead of estimating
This commit is contained in:
Fina 2024-03-21 23:29:53 -07:00 committed by GitHub
commit c9e3c10841
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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,8 @@ 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);
if (!score.Mods.Any(h => h is OsuModClassic cl && cl.NoSliderHeadAccuracy.Value))
effectiveMissCount = countMiss;
else
@ -126,7 +129,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;
}