reversing slider maintains shape

This commit is contained in:
Jason Won 2021-10-26 00:05:46 -04:00
parent 8015791d4c
commit a582976851

View File

@ -19,7 +19,7 @@ namespace osu.Game.Rulesets.Objects
public static void Reverse(this SliderPath sliderPath, out Vector2 positionalOffset)
{
var points = sliderPath.ControlPoints.ToArray();
positionalOffset = points.Last().Position;
positionalOffset = sliderPath.PositionAt(1);
sliderPath.ControlPoints.Clear();
@ -32,7 +32,10 @@ namespace osu.Game.Rulesets.Objects
// propagate types forwards to last null type
if (i == points.Length - 1)
{
p.Type = lastType;
p.Position = Vector2.Zero;
}
else if (p.Type != null)
(p.Type, lastType) = (lastType, p.Type);