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

Be doubly careful

This commit is contained in:
Nathen 2024-11-14 01:47:24 -05:00
parent ce818f59e7
commit 2ea2e5f1db

View File

@ -70,9 +70,12 @@ namespace osu.Game.Rulesets.Difficulty.Skills
/// </summary>
public virtual double CountTopWeightedStrains()
{
if (ObjectStrains.Count == 0)
return 0.0;
double consistentTopStrain = DifficultyValue() / 10; // What would the top strain be if all strain values were identical
if (ObjectStrains.Count == 0 || consistentTopStrain == 0)
if (consistentTopStrain == 0)
return 0.0;
// Use a weighted sum of all strains. Constants are arbitrary and give nice values