From 203bb4f75b541f4cc6f1056507e6c33db4074413 Mon Sep 17 00:00:00 2001 From: WilliamQiufeng Date: Sun, 18 Aug 2024 15:08:15 +0800 Subject: [PATCH] Pad 0 to bins if l >= StrainSolverData.Count, instead of breaking the loop --- .../Difficulty/Rulesets/Keys/DifficultyProcessorKeys.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Quaver.API/Maps/Processors/Difficulty/Rulesets/Keys/DifficultyProcessorKeys.cs b/Quaver.API/Maps/Processors/Difficulty/Rulesets/Keys/DifficultyProcessorKeys.cs index b0935ce0f..1a6c4af70 100644 --- a/Quaver.API/Maps/Processors/Difficulty/Rulesets/Keys/DifficultyProcessorKeys.cs +++ b/Quaver.API/Maps/Processors/Difficulty/Rulesets/Keys/DifficultyProcessorKeys.cs @@ -569,7 +569,10 @@ private float CalculateOverallDifficulty() while (r < StrainSolverData.Count - 1 && StrainSolverData[r + 1].StartTime < i + binSize) r++; if (l >= StrainSolverData.Count) - break; + { + bins.Add(0); + continue; + } var valuesInBin = StrainSolverData.GetRange(l, r - l + 1); var averageRating = valuesInBin.Count > 0 ? valuesInBin.Average(s => s.TotalStrainValue) : 0;