mirror of
https://github.com/ppy/osu
synced 2024-12-30 02:42:29 +00:00
Merge pull request #15301 from jaswon/reverse-slider-symmetric
Fix slider shape not always being maintained when reversing
This commit is contained in:
commit
4cef86dd12
@ -19,7 +19,7 @@ namespace osu.Game.Rulesets.Objects
|
|||||||
public static void Reverse(this SliderPath sliderPath, out Vector2 positionalOffset)
|
public static void Reverse(this SliderPath sliderPath, out Vector2 positionalOffset)
|
||||||
{
|
{
|
||||||
var points = sliderPath.ControlPoints.ToArray();
|
var points = sliderPath.ControlPoints.ToArray();
|
||||||
positionalOffset = points.Last().Position;
|
positionalOffset = sliderPath.PositionAt(1);
|
||||||
|
|
||||||
sliderPath.ControlPoints.Clear();
|
sliderPath.ControlPoints.Clear();
|
||||||
|
|
||||||
@ -32,7 +32,10 @@ namespace osu.Game.Rulesets.Objects
|
|||||||
|
|
||||||
// propagate types forwards to last null type
|
// propagate types forwards to last null type
|
||||||
if (i == points.Length - 1)
|
if (i == points.Length - 1)
|
||||||
|
{
|
||||||
p.Type = lastType;
|
p.Type = lastType;
|
||||||
|
p.Position = Vector2.Zero;
|
||||||
|
}
|
||||||
else if (p.Type != null)
|
else if (p.Type != null)
|
||||||
(p.Type, lastType) = (lastType, p.Type);
|
(p.Type, lastType) = (lastType, p.Type);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user