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

Fix circle-only map NaN values

This commit is contained in:
apollo-dw 2021-11-11 14:37:50 +00:00
parent 95bfb2c69b
commit 1ba01a7e9a

View File

@ -127,10 +127,13 @@ namespace osu.Game.Rulesets.Osu.Difficulty
// We assume 15% of sliders in a map are difficult since there's no way to tell from the performance calculator.
double estimateDifficultSliders = Attributes.SliderCount * 0.15;
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;
aimValue *= sliderNerfFactor;
if (Attributes.SliderCount > 0)
{
double estimateSliderEndsDropped = Math.Min(Math.Min(countOk + countMeh + countMiss, Attributes.MaxCombo - scoreMaxCombo), estimateDifficultSliders);
double sliderNerfFactor = (1 - Attributes.SliderFactor) * Math.Pow(1 - estimateSliderEndsDropped / estimateDifficultSliders, 3) + Attributes.SliderFactor;
aimValue *= sliderNerfFactor;
}
aimValue *= accuracy;
// It is important to also consider accuracy difficulty when doing that.