mirror of
https://github.com/ppy/osu.git
synced 2024-11-15 17:17:26 +08:00
Fix random mod needlessly trying to fix nested object positions on its own
This commit is contained in:
parent
1c23fd31d7
commit
89f47c4654
@ -232,8 +232,6 @@ namespace osu.Game.Rulesets.Osu.Utils
|
||||
slider.Position = workingObject.PositionModified = new Vector2(newX, newY);
|
||||
workingObject.EndPositionModified = slider.EndPosition;
|
||||
|
||||
shiftNestedObjects(slider, workingObject.PositionModified - workingObject.PositionOriginal);
|
||||
|
||||
return workingObject.PositionModified - previousPosition;
|
||||
}
|
||||
|
||||
@ -307,22 +305,6 @@ namespace osu.Game.Rulesets.Osu.Utils
|
||||
return new RectangleF(left, top, right - left, bottom - top);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Shifts all nested <see cref="SliderTick"/>s and <see cref="SliderRepeat"/>s by the specified shift.
|
||||
/// </summary>
|
||||
/// <param name="slider"><see cref="Slider"/> whose nested <see cref="SliderTick"/>s and <see cref="SliderRepeat"/>s should be shifted</param>
|
||||
/// <param name="shift">The <see cref="Vector2"/> the <see cref="Slider"/>'s nested <see cref="SliderTick"/>s and <see cref="SliderRepeat"/>s should be shifted by</param>
|
||||
private static void shiftNestedObjects(Slider slider, Vector2 shift)
|
||||
{
|
||||
foreach (var hitObject in slider.NestedHitObjects.Where(o => o is SliderTick || o is SliderRepeat))
|
||||
{
|
||||
if (!(hitObject is OsuHitObject osuHitObject))
|
||||
continue;
|
||||
|
||||
osuHitObject.Position += shift;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clamp a position to playfield, keeping a specified distance from the edges.
|
||||
/// </summary>
|
||||
|
Loading…
Reference in New Issue
Block a user