mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 13:32:54 +08:00
Optimise nested hitobject position computations
This commit is contained in:
parent
428f8b6670
commit
9ae67b519b
@ -47,7 +47,10 @@ namespace osu.Game.Rulesets.UI.Scrolling.Algorithms
|
||||
}
|
||||
|
||||
if (obj.NestedHitObjects != null)
|
||||
{
|
||||
ComputeInitialStates(obj.NestedHitObjects, direction, timeRange, length);
|
||||
ComputePositions(obj.NestedHitObjects, direction, obj.HitObject.StartTime, timeRange, length);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -74,9 +77,6 @@ namespace osu.Game.Rulesets.UI.Scrolling.Algorithms
|
||||
obj.X = (float)(-finalPosition * length.X);
|
||||
break;
|
||||
}
|
||||
|
||||
if (obj.NestedHitObjects != null)
|
||||
ComputePositions(obj.NestedHitObjects, direction, obj.HitObject.StartTime, timeRange, length);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,10 @@ namespace osu.Game.Rulesets.UI.Scrolling.Algorithms
|
||||
obj.LifetimeStart = obj.HitObject.StartTime - timeRange / controlPoint.Multiplier;
|
||||
|
||||
if (obj.NestedHitObjects != null)
|
||||
{
|
||||
ComputeInitialStates(obj.NestedHitObjects, direction, timeRange, length);
|
||||
ComputePositions(obj.NestedHitObjects, direction, obj.HitObject.StartTime, timeRange, length);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -55,9 +58,6 @@ namespace osu.Game.Rulesets.UI.Scrolling.Algorithms
|
||||
obj.X = (float)(-position * length.X);
|
||||
break;
|
||||
}
|
||||
|
||||
if (obj.NestedHitObjects != null)
|
||||
ComputePositions(obj.NestedHitObjects, direction, obj.HitObject.StartTime, timeRange, length);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user