1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 16:32:54 +08:00

Extract initial set out of loop

This commit is contained in:
Dan Balasescu 2021-12-21 12:39:34 +09:00
parent c21b2d1662
commit f366cdc73e

View File

@ -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;