1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-15 06:37:43 +08:00

Merge pull request #30618 from Natelytle/ltca-broke-pp

Fix NaN PP counter values while SR is 0
This commit is contained in:
Dean Herbert 2024-11-14 17:42:05 +09:00 committed by GitHub
commit 23167b0221
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -74,6 +74,10 @@ namespace osu.Game.Rulesets.Difficulty.Skills
return 0.0;
double consistentTopStrain = DifficultyValue() / 10; // What would the top strain be if all strain values were identical
if (consistentTopStrain == 0)
return ObjectStrains.Count;
// Use a weighted sum of all strains. Constants are arbitrary and give nice values
return ObjectStrains.Sum(s => 1.1 / (1 + Math.Exp(-10 * (s / consistentTopStrain - 0.88))));
}