mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-08 19:56:48 +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();
|
SetOfEntities::iterator itemItr = _simpleKinematicEntities.begin();
|
||||||
while (itemItr != _simpleKinematicEntities.end()) {
|
while (itemItr != _simpleKinematicEntities.end()) {
|
||||||
EntityItemPointer entity = *itemItr;
|
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
|
||||||
// The entity-server doesn't know where avatars are, so don't attempt to do simple extrapolation for
|
// children of avatars.
|
||||||
// children of avatars.
|
bool ancestryIsKnown;
|
||||||
!entity->hasAncestorOfType(NestableType::Avatar)) {
|
entity->getMaximumAACube(ancestryIsKnown);
|
||||||
|
bool hasAvatarAncestor = entity->hasAncestorOfType(NestableType::Avatar);
|
||||||
|
|
||||||
|
if (entity->isMovingRelativeToParent() && !entity->getPhysicsInfo() && ancestryIsKnown && !hasAvatarAncestor) {
|
||||||
entity->simulate(now);
|
entity->simulate(now);
|
||||||
_entitiesToSort.insert(entity);
|
_entitiesToSort.insert(entity);
|
||||||
++itemItr;
|
++itemItr;
|
||||||
|
|
Loading…
Reference in a new issue