From 0476bafd0898d8b327cb11908123002cbb738d32 Mon Sep 17 00:00:00 2001 From: axelrodR Date: Wed, 25 Jun 2014 22:40:01 +0300 Subject: [PATCH 1/3] Raised the number of search iterations during optimizePathTopology() to 48. --- DetourCrowd/Source/DetourPathCorridor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DetourCrowd/Source/DetourPathCorridor.cpp b/DetourCrowd/Source/DetourPathCorridor.cpp index 54a2ab8..06ec131 100644 --- a/DetourCrowd/Source/DetourPathCorridor.cpp +++ b/DetourCrowd/Source/DetourPathCorridor.cpp @@ -359,7 +359,7 @@ bool dtPathCorridor::optimizePathTopology(dtNavMeshQuery* navquery, const dtQuer if (m_npath < 3) return false; - static const int MAX_ITER = 32; + static const int MAX_ITER = 48; static const int MAX_RES = 32; dtPolyRef res[MAX_RES]; From 5d480636d19c6b88beb79685120a8e30e67baeca Mon Sep 17 00:00:00 2001 From: axelrodR Date: Fri, 27 Jun 2014 17:53:04 +0300 Subject: [PATCH 2/3] Removed the multiple nodes per tile boundary. Left only the any-angle improvement. --- Detour/Source/DetourNavMeshQuery.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Detour/Source/DetourNavMeshQuery.cpp b/Detour/Source/DetourNavMeshQuery.cpp index 9debb4d..8bb53df 100644 --- a/Detour/Source/DetourNavMeshQuery.cpp +++ b/Detour/Source/DetourNavMeshQuery.cpp @@ -1303,12 +1303,8 @@ dtStatus dtNavMeshQuery::updateSlicedFindPath(const int maxIter, int* doneIters) if (!m_query.filter->passFilter(neighbourRef, neighbourTile, neighbourPoly)) continue; - // deal explicitly with crossing tile boundaries - unsigned char crossSide = 0; - if (bestTile->links[i].side != 0xff) - crossSide = bestTile->links[i].side >> 1; - - dtNode* neighbourNode = m_nodePool->getNode(neighbourRef, crossSide); + // get the neighbor node + dtNode* neighbourNode = m_nodePool->getNode(neighbourRef, 0); if (!neighbourNode) { m_query.status |= DT_OUT_OF_NODES; From 1c7bd46812966b6d46fefd7570a3043a2816fa2e Mon Sep 17 00:00:00 2001 From: axelrodR Date: Fri, 27 Jun 2014 23:23:29 +0300 Subject: [PATCH 3/3] returned MAX_ITER of optimizePathTopology to 32 after I removed the multi-nodes per tile --- DetourCrowd/Source/DetourPathCorridor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DetourCrowd/Source/DetourPathCorridor.cpp b/DetourCrowd/Source/DetourPathCorridor.cpp index 06ec131..54a2ab8 100644 --- a/DetourCrowd/Source/DetourPathCorridor.cpp +++ b/DetourCrowd/Source/DetourPathCorridor.cpp @@ -359,7 +359,7 @@ bool dtPathCorridor::optimizePathTopology(dtNavMeshQuery* navquery, const dtQuer if (m_npath < 3) return false; - static const int MAX_ITER = 48; + static const int MAX_ITER = 32; static const int MAX_RES = 32; dtPolyRef res[MAX_RES];