mirror of
https://github.com/ppy/osu
synced 2025-02-03 03:42:15 +00:00
Fix last control point starting new segment
This commit is contained in:
parent
42e816fcae
commit
4b29d0ebe2
@ -336,9 +336,14 @@ namespace osu.Game.Rulesets.Objects.Legacy
|
||||
|
||||
while (++endIndex < vertices.Length - endPointLength)
|
||||
{
|
||||
// Keep incrementing while an implicit segment doesn't need to be started
|
||||
if (vertices[endIndex].Position.Value != vertices[endIndex - 1].Position.Value)
|
||||
continue;
|
||||
|
||||
// The last control point of each segment is not allowed to start a new implicit segment.
|
||||
if (endIndex == vertices.Length - endPointLength - 1)
|
||||
continue;
|
||||
|
||||
// Force a type on the last point, and return the current control point set as a segment.
|
||||
vertices[endIndex - 1].Type.Value = type;
|
||||
yield return vertices.AsMemory().Slice(startIndex, endIndex - startIndex);
|
||||
|
Loading…
Reference in New Issue
Block a user