From 8af97beb57dc5995defd8964af788c91daf0409a Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Thu, 28 Jul 2022 01:48:17 +0200 Subject: [PATCH] Fix offMeshConnections debug draw --- r5dev/naveditor/InputGeom.cpp | 10 +++++----- .../recast/DebugUtils/Source/DetourDebugDraw.cpp | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/r5dev/naveditor/InputGeom.cpp b/r5dev/naveditor/InputGeom.cpp index 3ee0eacf..2548642f 100644 --- a/r5dev/naveditor/InputGeom.cpp +++ b/r5dev/naveditor/InputGeom.cpp @@ -546,18 +546,18 @@ void InputGeom::drawOffMeshConnections(duDebugDraw* dd, bool hilight) float* v = &m_offMeshConVerts[i*3*2]; dd->vertex(v[0],v[1],v[2], baseColor); - dd->vertex(v[0],v[1]+0.2f,v[2], baseColor); + dd->vertex(v[0],v[1],v[2]+10.0f, baseColor); dd->vertex(v[3],v[4],v[5], baseColor); - dd->vertex(v[3],v[4]+0.2f,v[5], baseColor); + dd->vertex(v[3],v[4],v[5]+10.0f, baseColor); - duAppendCircle(dd, v[0],v[1]+0.1f,v[2], m_offMeshConRads[i], baseColor); - duAppendCircle(dd, v[3],v[4]+0.1f,v[5], m_offMeshConRads[i], baseColor); + duAppendCircle(dd, v[0],v[1],v[2]+5.0f, m_offMeshConRads[i], baseColor); + duAppendCircle(dd, v[3],v[4],v[5]+5.0f, m_offMeshConRads[i], baseColor); if (hilight) { duAppendArc(dd, v[0],v[1],v[2], v[3],v[4],v[5], 0.25f, - (m_offMeshConDirs[i]&1) ? 0.6f : 0.0f, 30.0f, conColor); + (m_offMeshConDirs[i]&DT_OFFMESH_CON_BIDIR) ? 30.0f : 0.0f, 30.0f, conColor); } } dd->end(); diff --git a/r5dev/thirdparty/recast/DebugUtils/Source/DetourDebugDraw.cpp b/r5dev/thirdparty/recast/DebugUtils/Source/DetourDebugDraw.cpp index e9403901..99abd501 100644 --- a/r5dev/thirdparty/recast/DebugUtils/Source/DetourDebugDraw.cpp +++ b/r5dev/thirdparty/recast/DebugUtils/Source/DetourDebugDraw.cpp @@ -202,7 +202,7 @@ static void drawMeshTile(duDebugDraw* dd, const dtNavMesh& mesh, const dtNavMesh // Connection arc. duAppendArc(dd, con->pos[0],con->pos[1],con->pos[2], con->pos[3],con->pos[4],con->pos[5], 0.25f, - (con->flags & 1) ? 30.0f : 0.0f, 30.0f, col); + (con->flags & DT_OFFMESH_CON_BIDIR) ? 30.0f : 0.0f, 30.0f, col); } dd->end(); } @@ -443,7 +443,7 @@ void duDebugDrawNavMeshPoly(duDebugDraw* dd, const dtNavMesh& mesh, dtPolyRef re // Connection arc. duAppendArc(dd, con->pos[0],con->pos[1],con->pos[2], con->pos[3],con->pos[4],con->pos[5], 0.25f, - (con->flags & 1) ? 30.0f : 0.0f, 30.0f, c); + (con->flags & DT_OFFMESH_CON_BIDIR) ? 30.0f : 0.0f, 30.0f, c); dd->end(); }