mirror of
https://github.com/ppy/osu.git
synced 2024-11-15 09:47:24 +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:
commit
23167b0221
@ -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))));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user