From 5d6312ab1e3218bb7e9a7087bb4dc893ba9a1ca0 Mon Sep 17 00:00:00 2001 From: Jakob Botsch Nielsen Date: Wed, 13 Jul 2016 05:37:15 +0200 Subject: [PATCH] Mark start poly in NavMeshPruneTool The start poly would not be pruned if it was the only poly on the island. Fix #216 --- RecastDemo/Source/NavMeshPruneTool.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/RecastDemo/Source/NavMeshPruneTool.cpp b/RecastDemo/Source/NavMeshPruneTool.cpp index 859f67e..6536393 100644 --- a/RecastDemo/Source/NavMeshPruneTool.cpp +++ b/RecastDemo/Source/NavMeshPruneTool.cpp @@ -171,6 +171,8 @@ static void floodNavmesh(dtNavMesh* nav, NavmeshFlags* flags, dtPolyRef start, u // If already visited, skip. if (flags->getFlags(start)) return; + + flags->setFlags(start, flag); PolyRefArray openList; openList.push(start);