Merge pull request #41 from axelrodR/master

Removed the multiple dtNode per poly for tile boundaries
This commit is contained in:
Mikko Mononen 2014-06-28 11:20:48 +03:00
commit 0cdf4c5a11

View File

@ -1303,12 +1303,8 @@ dtStatus dtNavMeshQuery::updateSlicedFindPath(const int maxIter, int* doneIters)
if (!m_query.filter->passFilter(neighbourRef, neighbourTile, neighbourPoly)) if (!m_query.filter->passFilter(neighbourRef, neighbourTile, neighbourPoly))
continue; continue;
// deal explicitly with crossing tile boundaries // get the neighbor node
unsigned char crossSide = 0; dtNode* neighbourNode = m_nodePool->getNode(neighbourRef, 0);
if (bestTile->links[i].side != 0xff)
crossSide = bestTile->links[i].side >> 1;
dtNode* neighbourNode = m_nodePool->getNode(neighbourRef, crossSide);
if (!neighbourNode) if (!neighbourNode)
{ {
m_query.status |= DT_OUT_OF_NODES; m_query.status |= DT_OUT_OF_NODES;