mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Recast: fix sliced path finder bug
See https://github.com/recastnavigation/recastnavigation/issues/438
This commit is contained in:
parent
5a4a7d1181
commit
3511998837
@ -1363,9 +1363,13 @@ dtStatus dtNavMeshQuery::updateSlicedFindPath(const int maxIter, int* doneIters,
|
||||
if (!filter->passFilter(neighbourRef, neighbourTile, neighbourPoly))
|
||||
continue;
|
||||
|
||||
unsigned char crossSide = 0; // See https://github.com/recastnavigation/recastnavigation/issues/438
|
||||
|
||||
if (bestTile->links[i].side != 0xff)
|
||||
crossSide = bestTile->links[i].side >> 1;
|
||||
|
||||
// get the neighbor node
|
||||
dtNode* neighbourNode = m_nodePool->getNode(neighbourRef, 0);
|
||||
dtNode* neighbourNode = m_nodePool->getNode(neighbourRef, crossSide);
|
||||
if (!neighbourNode)
|
||||
{
|
||||
m_query.status |= DT_OUT_OF_NODES;
|
||||
|
Loading…
x
Reference in New Issue
Block a user