From 3b10774ca4c5908faba5acba98c9c9d06b6bdb65 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Wed, 17 Jul 2024 02:03:37 +0200 Subject: [PATCH] Recast: light cleanup in off-mesh connection renderer --- src/thirdparty/recast/DebugUtils/Source/DetourDebugDraw.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/thirdparty/recast/DebugUtils/Source/DetourDebugDraw.cpp b/src/thirdparty/recast/DebugUtils/Source/DetourDebugDraw.cpp index f4a41fab..92025f26 100644 --- a/src/thirdparty/recast/DebugUtils/Source/DetourDebugDraw.cpp +++ b/src/thirdparty/recast/DebugUtils/Source/DetourDebugDraw.cpp @@ -216,9 +216,11 @@ static void drawMeshTile(duDebugDraw* dd, const dtNavMesh& mesh, const dtNavMesh bool endSet = false; for (unsigned int k = p->firstLink; k != DT_NULL_LINK; k = tile->links[k].next) { - if (tile->links[k].edge == 0) + const dtLink& link = tile->links[k]; + + if (link.edge == 0) startSet = true; - if (tile->links[k].edge == 1) + if (link.edge == 1) endSet = true; }