Be doubly careful

This commit is contained in:
Nathen 2024-11-14 01:47:24 -05:00
parent ce818f59e7
commit 2ea2e5f1db
1 changed files with 4 additions and 1 deletions

View File

@ -70,9 +70,12 @@ public sealed override void Process(DifficultyHitObject current)
/// </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