diff --git a/src/graphics/render/WorldRenderer.cpp b/src/graphics/render/WorldRenderer.cpp index 2e150e1f7..357a2e1cc 100644 --- a/src/graphics/render/WorldRenderer.cpp +++ b/src/graphics/render/WorldRenderer.cpp @@ -275,7 +275,8 @@ void WorldRenderer::renderLines( auto ctx = pctx.sub(lineBatch.get()); bool culling = engine.getSettings().graphics.frustumCulling.get(); level.entities->renderDebug( - *lineBatch, culling ? frustumCulling.get() : nullptr, ctx + *lineBatch, culling ? frustumCulling.get() : nullptr, ctx, + player.currentCamera.get() == player.fpCamera.get() ? player.getEntity() : 0 ); } } diff --git a/src/objects/Entities.cpp b/src/objects/Entities.cpp index fafd99fe5..c4a4a763b 100644 --- a/src/objects/Entities.cpp +++ b/src/objects/Entities.cpp @@ -415,7 +415,7 @@ static void debug_render_skeleton( } void Entities::renderDebug( - LineBatch& batch, const Frustum* frustum, const DrawContext& pctx + LineBatch& batch, const Frustum* frustum, const DrawContext& pctx, entityid_t fpsEntity ) { { auto ctx = pctx.sub(&batch); @@ -443,12 +443,15 @@ void Entities::renderDebug( } } { - auto view = registry->view(); + auto view = registry->view(); auto ctx = pctx.sub(&batch); ctx.setDepthTest(false); ctx.setDepthMask(false); ctx.setLineWidth(2); - for (auto [entity, transform, skeleton] : view.each()) { + for (auto [entity, eid, transform, skeleton] : view.each()) { + if (eid.uid == fpsEntity) { + continue; + } auto config = skeleton.config; if (config == nullptr) { continue; diff --git a/src/objects/Entities.hpp b/src/objects/Entities.hpp index 0d003ffb1..b678512a9 100644 --- a/src/objects/Entities.hpp +++ b/src/objects/Entities.hpp @@ -58,7 +58,7 @@ public: void update(float delta); void renderDebug( - LineBatch& batch, const Frustum* frustum, const DrawContext& ctx + LineBatch& batch, const Frustum* frustum, const DrawContext& ctx, entityid_t fpsEntity ); void render( const Assets& assets,