From 18848d589b6a6ea1d5d3bda6a237f310a06da9ef Mon Sep 17 00:00:00 2001 From: tedpark217 Date: Thu, 6 Jun 2024 17:21:52 -0700 Subject: [PATCH] update render loop for players --- src/client/client.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/client/client.cpp b/src/client/client.cpp index f783088b..28bbc3ef 100644 --- a/src/client/client.cpp +++ b/src/client/client.cpp @@ -827,7 +827,16 @@ void Client::geometryPass() { auto dist = glm::distance(sharedObject->physics.corner, my_pos); if (!is_floor) { - if (!is_dm && !is_ceiling && dist > this->config.client.render) { + if (!is_dm && !is_ceiling && + (sharedObject->type == ObjectType::FloorSpike || + sharedObject->type == ObjectType::Lava || + sharedObject->type == ObjectType::ArrowTrap || + sharedObject->type == ObjectType::SpikeTrap || + sharedObject->type == ObjectType::Projectile) + && dist > this->config.client.render / 2) { + continue; + } + else if (!is_dm && !is_ceiling && dist > this->config.client.render) { continue; } }