mirror of
https://github.com/ppy/osu.git
synced 2024-11-14 16:37:26 +08:00
Apply the same change to HandleFlip
This commit is contained in:
parent
c203a030c1
commit
4af76b9f48
@ -127,16 +127,13 @@ namespace osu.Game.Rulesets.Osu.Edit
|
|||||||
{
|
{
|
||||||
didFlip = true;
|
didFlip = true;
|
||||||
|
|
||||||
var controlPoints = slider.Path.ControlPoints.Select(p =>
|
foreach (var cp in slider.Path.ControlPoints)
|
||||||
new PathControlPoint(new Vector2(
|
{
|
||||||
(direction == Direction.Horizontal ? -1 : 1) * p.Position.X,
|
cp.Position = new Vector2(
|
||||||
(direction == Direction.Vertical ? -1 : 1) * p.Position.Y
|
(direction == Direction.Horizontal ? -1 : 1) * cp.Position.X,
|
||||||
), p.Type)).ToArray();
|
(direction == Direction.Vertical ? -1 : 1) * cp.Position.Y
|
||||||
|
);
|
||||||
// Importantly, update as a single operation so automatic adjustment of control points to different
|
}
|
||||||
// curve types does not unexpectedly trigger and change the slider's shape.
|
|
||||||
slider.Path.ControlPoints.Clear();
|
|
||||||
slider.Path.ControlPoints.AddRange(controlPoints);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -186,8 +183,8 @@ namespace osu.Game.Rulesets.Osu.Edit
|
|||||||
|
|
||||||
if (h is IHasPath path)
|
if (h is IHasPath path)
|
||||||
{
|
{
|
||||||
foreach (PathControlPoint t in path.Path.ControlPoints)
|
foreach (PathControlPoint cp in path.Path.ControlPoints)
|
||||||
t.Position = RotatePointAroundOrigin(t.Position, Vector2.Zero, delta);
|
cp.Position = RotatePointAroundOrigin(cp.Position, Vector2.Zero, delta);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user