1
0
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:
smoogipoo 2018-01-11 15:25:15 +09:00
parent 428f8b6670
commit 9ae67b519b
2 changed files with 6 additions and 6 deletions

View File

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

View File

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