From a350a922640e7b0b66321ae2670a406393fbec9d Mon Sep 17 00:00:00 2001 From: axelrodR Date: Wed, 28 May 2014 00:18:01 +0300 Subject: [PATCH] addressed Mikko's comment about isValidPolyRef returning a boolean and not dtStatus. --- Detour/Source/DetourNavMeshQuery.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Detour/Source/DetourNavMeshQuery.cpp b/Detour/Source/DetourNavMeshQuery.cpp index 73fdf67..64e8383 100644 --- a/Detour/Source/DetourNavMeshQuery.cpp +++ b/Detour/Source/DetourNavMeshQuery.cpp @@ -1268,7 +1268,7 @@ dtStatus dtNavMeshQuery::updateSlicedFindPath(const int maxIter, int* doneIters) if (parentRef) { bool invalidParent = dtStatusFailed(m_nav->getTileAndPolyByRef(parentRef, &parentTile, &parentPoly)); - if (invalidParent || (grandpaRef && dtStatusFailed(m_nav->isValidPolyRef(grandpaRef))) ) + if (invalidParent || (grandpaRef && !m_nav->isValidPolyRef(grandpaRef)) ) { // The polygon has disappeared during the sliced query, fail. m_query.status = DT_FAILURE;