mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-11-20 09:29:44 +00:00
hide self skeleton debug rendering in first person
This commit is contained in:
parent
73229e34fc
commit
ecedc3c436
3 changed files with 9 additions and 5 deletions
|
|
@ -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<Transform, rigging::Skeleton>();
|
||||
auto view = registry->view<EntityId, Transform, rigging::Skeleton>();
|
||||
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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue