mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Fix last control point starting new segment
This commit is contained in:
@ -336,9 +336,14 @@ namespace osu.Game.Rulesets.Objects.Legacy
|
|||||||
|
|
||||||
while (++endIndex < vertices.Length - endPointLength)
|
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)
|
if (vertices[endIndex].Position.Value != vertices[endIndex - 1].Position.Value)
|
||||||
continue;
|
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.
|
// Force a type on the last point, and return the current control point set as a segment.
|
||||||
vertices[endIndex - 1].Type.Value = type;
|
vertices[endIndex - 1].Type.Value = type;
|
||||||
yield return vertices.AsMemory().Slice(startIndex, endIndex - startIndex);
|
yield return vertices.AsMemory().Slice(startIndex, endIndex - startIndex);
|
||||||
|
Reference in New Issue
Block a user