mirror of https://github.com/ppy/osu
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 @@ public virtual double CountTopWeightedStrains()
|
|||
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