mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 12:04:18 +02:00
size-cull parent entities by their queryAABox rather than their dimensions to avoid having the entity-server send a child but not the parent
This commit is contained in:
parent
8e16bda7bb
commit
1ae47b17f0
1 changed files with 5 additions and 1 deletions
|
@ -313,7 +313,11 @@ OctreeElement::AppendState EntityTreeElement::appendElementData(OctreePacketData
|
|||
// pops to the next higher cell. So we want to check to see that the entity is large enough to be seen
|
||||
// before we consider including it.
|
||||
if (includeThisEntity) {
|
||||
AABox entityBounds = entity->getAABox(success);
|
||||
success = true;
|
||||
// we can't cull a parent-entity by it's dimensions because the child may be larger. we need to
|
||||
// avoid sending details about a child but not the parent. the parent's queryAACube should have
|
||||
// been adjusted to encompase the queryAACube of the child.
|
||||
AABox entityBounds = entity->hasChildren() ? AABox(entityCube) : entity->getAABox(success);
|
||||
if (!success) {
|
||||
// if this entity is a child of an avatar, the entity-server wont be able to determine its
|
||||
// AABox. If this happens, fall back to the queryAACube.
|
||||
|
|
Loading…
Reference in a new issue