Skip to content

Commit

Permalink
Merge pull request #2 from Finadoggie/dropped-tail-fix
Browse files Browse the repository at this point in the history
Use actual sliderends dropped instead of estimating
  • Loading branch information
Finadoggie authored Mar 22, 2024
2 parents 12afa8d + eb30b4a commit c9e3c10
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public class OsuPerformanceCalculator : PerformanceCalculator
private int countOk;
private int countMeh;
private int countMiss;
private int countSliderEndsDropped;

private double effectiveMissCount;

Expand All @@ -39,6 +40,8 @@ protected override PerformanceAttributes CreatePerformanceAttributes(ScoreInfo s
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
Expand Down Expand Up @@ -126,7 +129,11 @@ private double computeAimValue(ScoreInfo score, OsuDifficultyAttributes attribut
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;
}

Expand Down

0 comments on commit c9e3c10

Please sign in to comment.