From 2ea2e5f1db40dacf02a297f571a481eec3351c6f Mon Sep 17 00:00:00 2001 From: Nathen Date: Thu, 14 Nov 2024 01:47:24 -0500 Subject: [PATCH] Be doubly careful --- osu.Game/Rulesets/Difficulty/Skills/StrainSkill.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/osu.Game/Rulesets/Difficulty/Skills/StrainSkill.cs b/osu.Game/Rulesets/Difficulty/Skills/StrainSkill.cs index 1944b54e0c..56249f19a7 100644 --- a/osu.Game/Rulesets/Difficulty/Skills/StrainSkill.cs +++ b/osu.Game/Rulesets/Difficulty/Skills/StrainSkill.cs @@ -70,9 +70,12 @@ public sealed override void Process(DifficultyHitObject current) /// 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