From 36484dbb822a390ec4471fe64b79e030201a10eb Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Wed, 4 Sep 2024 22:47:58 +0200 Subject: [PATCH] Recast: increase traverse link brightness --- .../recast/DebugUtils/Source/DetourDebugDraw.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/thirdparty/recast/DebugUtils/Source/DetourDebugDraw.cpp b/src/thirdparty/recast/DebugUtils/Source/DetourDebugDraw.cpp index ade01a2e..dc1d7bbb 100644 --- a/src/thirdparty/recast/DebugUtils/Source/DetourDebugDraw.cpp +++ b/src/thirdparty/recast/DebugUtils/Source/DetourDebugDraw.cpp @@ -284,15 +284,14 @@ static void drawTraverseLinks(duDebugDraw* dd, const dtNavMesh& mesh, const dtNa const dtMeshTile* endTile = mesh.getTile(it); const dtPoly* endPoly = &endTile->polys[ip]; - const dtTileRef tileRef = mesh.getTileRef(tile); - rdIgnoreUnused(tileRef); + // Unique color for each type. + const int col = duIntToCol(linkTraverseType, 196); if (endPoly->getType() == DT_POLYTYPE_OFFMESH_CONNECTION) { const dtOffMeshConnection* con = &endTile->offMeshCons[ip - endTile->header->offMeshBase]; dd->begin(DU_DRAW_LINES, 2.0f, offset); - const int col = duIntToCol(linkTraverseType, 128); dd->vertex(&con->pos[0], col); dd->vertex(&con->pos[3], col); @@ -347,9 +346,6 @@ static void drawTraverseLinks(duDebugDraw* dd, const dtNavMesh& mesh, const dtNa highestPos[2] }; - // Unique color for each type. - const int col = duIntToCol(linkTraverseType, 128); - dd->begin(DU_DRAW_LINES, 2.0f, offset); const float* targetStartPos = startPointHighest ? offsetEndPos : startPos; @@ -364,7 +360,7 @@ static void drawTraverseLinks(duDebugDraw* dd, const dtNavMesh& mesh, const dtNa { // If the reverse link is set, render white crosses to confirm // the links are set properly. - duAppendCross(dd, startPos[0], startPos[1], startPos[2], 10.f, duRGBA(255,255,255,180)); + duAppendCross(dd, startPos[0], startPos[1], startPos[2], 10.f, duRGBA(255,255,255,196)); } dd->end();