From a582976851306ea1f567768381b70df8e26fc9e3 Mon Sep 17 00:00:00 2001 From: Jason Won Date: Tue, 26 Oct 2021 00:05:46 -0400 Subject: [PATCH] reversing slider maintains shape --- osu.Game/Rulesets/Objects/SliderPathExtensions.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/osu.Game/Rulesets/Objects/SliderPathExtensions.cs b/osu.Game/Rulesets/Objects/SliderPathExtensions.cs index 663746bfca..052fc7c775 100644 --- a/osu.Game/Rulesets/Objects/SliderPathExtensions.cs +++ b/osu.Game/Rulesets/Objects/SliderPathExtensions.cs @@ -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);