diff --git a/spine-csharp/src/Triangulator.cs b/spine-csharp/src/Triangulator.cs index baf746302..d19a13b39 100644 --- a/spine-csharp/src/Triangulator.cs +++ b/spine-csharp/src/Triangulator.cs @@ -1,4 +1,4 @@ -/****************************************************************************** +/****************************************************************************** * Spine Runtimes Software License v2.5 * * Copyright (c) 2013-2016, Esoteric Software @@ -64,8 +64,9 @@ namespace Spine { while (vertexCount > 3) { // Find ear tip. int previous = vertexCount - 1, i = 0, next = 1; + + // outer: while (true) { - outer: if (!isConcave[i]) { int p1 = indices[previous] << 1, p2 = indices[i] << 1, p3 = indices[next] << 1; float p1x = vertices[p1], p1y = vertices[p1 + 1]; @@ -77,7 +78,7 @@ namespace Spine { float vx = vertices[v], vy = vertices[v + 1]; if (PositiveArea(p3x, p3y, p1x, p1y, vx, vy)) { if (PositiveArea(p1x, p1y, p2x, p2y, vx, vy)) { - if (PositiveArea(p2x, p2y, p3x, p3y, vx, vy)) goto outer; + if (PositiveArea(p2x, p2y, p3x, p3y, vx, vy)) goto outer; // break outer; } } } @@ -96,6 +97,7 @@ namespace Spine { i = next; next = (next + 1) % vertexCount; } + outer: // Cut ear tip. triangles.Add(indices[(vertexCount + i - 1) % vertexCount]);