mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 00:02:54 +08:00
Fix slider paths being extended even when the last two points are equal
This commit is contained in:
parent
f687ed8599
commit
81fee02c2b
@ -280,6 +280,13 @@ namespace osu.Game.Rulesets.Objects
|
||||
|
||||
if (ExpectedDistance.Value is double expectedDistance && calculatedLength != expectedDistance)
|
||||
{
|
||||
// In osu-stable, if the last two control points of a slider are equal, extension is not performed.
|
||||
if (ControlPoints.Count >= 2 && ControlPoints[^1].Position == ControlPoints[^2].Position && expectedDistance > calculatedLength)
|
||||
{
|
||||
cumulativeLength.Add(calculatedLength);
|
||||
return;
|
||||
}
|
||||
|
||||
// The last length is always incorrect
|
||||
cumulativeLength.RemoveAt(cumulativeLength.Count - 1);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user