Skip to content

Commit

Permalink
update render loop for players
Browse files Browse the repository at this point in the history
  • Loading branch information
tedpark217 committed Jun 7, 2024
1 parent cb82a11 commit 18848d5
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/client/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 18848d5

Please sign in to comment.