mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Recast: mark unconnected portal edges as boundary edges
We can utilize this edge to create traverse links, which only happen on boundary edges.
This commit is contained in:
parent
af19a2e5b3
commit
6d41854ed2
@ -493,6 +493,14 @@ void dtNavMesh::connectExtLinks(dtMeshTile* tile, dtMeshTile* target, int side)
|
||||
dtPolyRef nei[4];
|
||||
float neia[4*2];
|
||||
int nnei = findConnectingPolys(va,vb, target, rdOppositeTile(dir), nei,neia,4);
|
||||
|
||||
// If the portal edge has no neighbor, mark the edge as a boundary edge.
|
||||
if (!nnei)
|
||||
{
|
||||
poly->neis[j] = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
for (int k = 0; k < nnei; ++k)
|
||||
{
|
||||
unsigned int idx = tile->allocLink();
|
||||
|
Loading…
x
Reference in New Issue
Block a user