Apply patches to recast

This commit is contained in:
KimLS 2019-05-16 14:37:52 -07:00
parent f2d47927b8
commit 5936d865b5

View File

@ -1032,7 +1032,9 @@ dtStatus dtNavMeshQuery::findPath(dtPolyRef startRef, dtPolyRef endRef,
// The API input has been cheked already, skip checking internal data.
const dtMeshTile* neighbourTile = 0;
const dtPoly* neighbourPoly = 0;
m_nav->getTileAndPolyByRefUnsafe(neighbourRef, &neighbourTile, &neighbourPoly);
if (dtStatusFailed(m_nav->getTileAndPolyByRef(neighbourRef, &neighbourTile, &neighbourPoly))) {
continue;
}
if (!filter->passFilter(neighbourRef, neighbourTile, neighbourPoly))
continue;
@ -1345,7 +1347,9 @@ dtStatus dtNavMeshQuery::updateSlicedFindPath(const int maxIter, int* doneIters)
// The API input has been cheked already, skip checking internal data.
const dtMeshTile* neighbourTile = 0;
const dtPoly* neighbourPoly = 0;
m_nav->getTileAndPolyByRefUnsafe(neighbourRef, &neighbourTile, &neighbourPoly);
if (dtStatusFailed(m_nav->getTileAndPolyByRef(neighbourRef, &neighbourTile, &neighbourPoly))) {
continue;
}
if (!m_query.filter->passFilter(neighbourRef, neighbourTile, neighbourPoly))
continue;