mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-03 22:45:33 +02:00
try harder to not do simple-simulation on things that have an avatar ancestor
This commit is contained in:
parent
a1766539f4
commit
d7fc789ea7
1 changed files with 8 additions and 5 deletions
|
@ -261,11 +261,14 @@ void EntitySimulation::moveSimpleKinematics(const quint64& now) {
|
|||
SetOfEntities::iterator itemItr = _simpleKinematicEntities.begin();
|
||||
while (itemItr != _simpleKinematicEntities.end()) {
|
||||
EntityItemPointer entity = *itemItr;
|
||||
if (entity->isMovingRelativeToParent() &&
|
||||
!entity->getPhysicsInfo() &&
|
||||
// The entity-server doesn't know where avatars are, so don't attempt to do simple extrapolation for
|
||||
// children of avatars.
|
||||
!entity->hasAncestorOfType(NestableType::Avatar)) {
|
||||
|
||||
// The entity-server doesn't know where avatars are, so don't attempt to do simple extrapolation for
|
||||
// children of avatars.
|
||||
bool ancestryIsKnown;
|
||||
entity->getMaximumAACube(ancestryIsKnown);
|
||||
bool hasAvatarAncestor = entity->hasAncestorOfType(NestableType::Avatar);
|
||||
|
||||
if (entity->isMovingRelativeToParent() && !entity->getPhysicsInfo() && ancestryIsKnown && !hasAvatarAncestor) {
|
||||
entity->simulate(now);
|
||||
_entitiesToSort.insert(entity);
|
||||
++itemItr;
|
||||
|
|
Loading…
Reference in a new issue