From f366cdc73eabbaff9224e3c7010e3f641a079158 Mon Sep 17 00:00:00 2001 From: Dan Balasescu Date: Tue, 21 Dec 2021 12:39:34 +0900 Subject: [PATCH] Extract initial set out of loop --- osu.Game.Rulesets.Osu/Difficulty/Skills/Flashlight.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Difficulty/Skills/Flashlight.cs b/osu.Game.Rulesets.Osu/Difficulty/Skills/Flashlight.cs index bdf7032521..ff0780be85 100644 --- a/osu.Game.Rulesets.Osu/Difficulty/Skills/Flashlight.cs +++ b/osu.Game.Rulesets.Osu/Difficulty/Skills/Flashlight.cs @@ -40,7 +40,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills double result = 0.0; - OsuDifficultyHitObject lastObj = null; + OsuDifficultyHitObject lastObj = osuCurrent; // This is iterating backwards in time from the current object. for (int i = 0; i < Previous.Count; i++) @@ -48,8 +48,6 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills var currentObj = (OsuDifficultyHitObject)Previous[i]; var currentHitObject = (OsuHitObject)(currentObj.BaseObject); - lastObj ??= osuCurrent; - if (!(currentObj.BaseObject is Spinner)) { double jumpDistance = (osuHitObject.StackedPosition - currentHitObject.EndPosition).Length;