From 35f64d9aaea7729829fc0233792b93f3484b7c9c Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Thu, 26 Dec 2019 17:54:31 +0900 Subject: [PATCH] More comments --- osu.Game/Rulesets/Scoring/DrainingHealthProcessor.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/osu.Game/Rulesets/Scoring/DrainingHealthProcessor.cs b/osu.Game/Rulesets/Scoring/DrainingHealthProcessor.cs index e7e8656efb..96242205d4 100644 --- a/osu.Game/Rulesets/Scoring/DrainingHealthProcessor.cs +++ b/osu.Game/Rulesets/Scoring/DrainingHealthProcessor.cs @@ -105,6 +105,7 @@ namespace osu.Game.Rulesets.Scoring // Subtract any break time from the duration since the last object if (beatmap.Breaks.Count > 0) { + // Advance the last break occuring before the current time while (currentBreak + 1 < beatmap.Breaks.Count && beatmap.Breaks[currentBreak + 1].EndTime < currentTime) currentBreak++; @@ -126,7 +127,7 @@ namespace osu.Game.Rulesets.Scoring if (Math.Abs(lowestHealth - targetMinimumHealth) <= minimum_health_error) break; - // This effectively works like a binary search - each iteration the search space moves closer to the the target, but may exceed it. + // This effectively works like a binary search - each iteration the search space moves closer to the target, but may exceed it. adjustment *= 2; result += 1.0 / adjustment * Math.Sign(lowestHealth - targetMinimumHealth); }