mirror of
https://github.com/recastnavigation/recastnavigation.git
synced 2026-11-18 13:56:00 +00:00
Fixed bug in edge generation (also appears in regular side). Added portal edge detection. Adjusted layer related debug draw.
This commit is contained in:
@@ -59,6 +59,7 @@ static bool buildMeshAdjacency(unsigned short* polys, const int npolys,
|
||||
unsigned short* t = &polys[i*vertsPerPoly*2];
|
||||
for (int j = 0; j < vertsPerPoly; ++j)
|
||||
{
|
||||
if (t[j] == RC_MESH_NULL_IDX) break;
|
||||
unsigned short v0 = t[j];
|
||||
unsigned short v1 = (j+1 >= vertsPerPoly || t[j+1] == RC_MESH_NULL_IDX) ? t[0] : t[j+1];
|
||||
if (v0 < v1)
|
||||
@@ -83,6 +84,7 @@ static bool buildMeshAdjacency(unsigned short* polys, const int npolys,
|
||||
unsigned short* t = &polys[i*vertsPerPoly*2];
|
||||
for (int j = 0; j < vertsPerPoly; ++j)
|
||||
{
|
||||
if (t[j] == RC_MESH_NULL_IDX) break;
|
||||
unsigned short v0 = t[j];
|
||||
unsigned short v1 = (j+1 >= vertsPerPoly || t[j+1] == RC_MESH_NULL_IDX) ? t[0] : t[j+1];
|
||||
if (v0 > v1)
|
||||
|
||||
Reference in New Issue
Block a user