From 677d993403a5bebb184df096f2d3be0166da7a40 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Wed, 27 Jul 2022 14:56:11 +0200 Subject: [PATCH] Draw ground convex points red as well --- r5dev/naveditor/InputGeom.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/r5dev/naveditor/InputGeom.cpp b/r5dev/naveditor/InputGeom.cpp index 26314f46..52dfdbbb 100644 --- a/r5dev/naveditor/InputGeom.cpp +++ b/r5dev/naveditor/InputGeom.cpp @@ -626,7 +626,7 @@ void InputGeom::drawConvexVolumes(struct duDebugDraw* dd, bool /*hilight*/) unsigned int col; if (vol->area == SAMPLE_POLYAREA_GROUND) - col = duRGBA(255, 0, 0, 220); // Use red for visibility (ground acts as deletion). + col = duRGBA(255, 0, 0, 220); else col = duTransCol(dd->areaToCol(vol->area), 220); @@ -648,7 +648,13 @@ void InputGeom::drawConvexVolumes(struct duDebugDraw* dd, bool /*hilight*/) for (int i = 0; i < m_volumeCount; ++i) { const ConvexVolume* vol = &m_volumes[i]; - unsigned int col = duDarkenCol(duTransCol(dd->areaToCol(vol->area), 220)); + unsigned int col; + + if (vol->area == SAMPLE_POLYAREA_GROUND) + col = duRGBA(255, 0, 0, 220); + else + col = duDarkenCol(duTransCol(dd->areaToCol(vol->area), 220)); + for (int j = 0; j < vol->nverts; ++j) { dd->vertex(vol->verts[j*3+0],vol->verts[j*3+1]+0.1f,vol->verts[j*3+2], col); @@ -657,7 +663,6 @@ void InputGeom::drawConvexVolumes(struct duDebugDraw* dd, bool /*hilight*/) } } dd->end(); - - + dd->depthMask(true); }