mirror of
https://github.com/ppy/osu
synced 2025-02-19 11:56:58 +00:00
reversing slider maintains shape
This commit is contained in:
parent
8015791d4c
commit
a582976851
@ -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