mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 04:02:59 +08:00
Extract initial set out of loop
This commit is contained in:
parent
c21b2d1662
commit
f366cdc73e
@ -40,7 +40,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
|
|||||||
|
|
||||||
double result = 0.0;
|
double result = 0.0;
|
||||||
|
|
||||||
OsuDifficultyHitObject lastObj = null;
|
OsuDifficultyHitObject lastObj = osuCurrent;
|
||||||
|
|
||||||
// This is iterating backwards in time from the current object.
|
// This is iterating backwards in time from the current object.
|
||||||
for (int i = 0; i < Previous.Count; i++)
|
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 currentObj = (OsuDifficultyHitObject)Previous[i];
|
||||||
var currentHitObject = (OsuHitObject)(currentObj.BaseObject);
|
var currentHitObject = (OsuHitObject)(currentObj.BaseObject);
|
||||||
|
|
||||||
lastObj ??= osuCurrent;
|
|
||||||
|
|
||||||
if (!(currentObj.BaseObject is Spinner))
|
if (!(currentObj.BaseObject is Spinner))
|
||||||
{
|
{
|
||||||
double jumpDistance = (osuHitObject.StackedPosition - currentHitObject.EndPosition).Length;
|
double jumpDistance = (osuHitObject.StackedPosition - currentHitObject.EndPosition).Length;
|
||||||
|
Loading…
Reference in New Issue
Block a user