From db3520b33211732e208dc33e180bbaf5be35f8c5 Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Fri, 1 Jun 2018 16:38:03 -0700 Subject: [PATCH] also update queryAACube for 'Held' things --- libraries/physics/src/EntityMotionState.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/libraries/physics/src/EntityMotionState.cpp b/libraries/physics/src/EntityMotionState.cpp index deb779b1f8..594ea476f6 100644 --- a/libraries/physics/src/EntityMotionState.cpp +++ b/libraries/physics/src/EntityMotionState.cpp @@ -446,17 +446,13 @@ bool EntityMotionState::shouldSendUpdate(uint32_t simulationStep) { // this case is prevented by setting _ownershipState to UNOWNABLE in EntityMotionState::ctor assert(!(_entity->getClientOnly() && _entity->getOwningAvatarID() != Physics::getSessionUUID())); - // shouldSendUpdate() sould NOT be triggering updates to maintain the queryAACube of dynamic entities. - // The server is supposed to predict the transform of such moving things. The client performs a "double prediction" - // where it predicts what the the server is doing, and only sends updates whent the entity's true transform - // differs significantly. That is what the remoteSimulationOutOfSync() logic is all about. - if (_entity->dynamicDataNeedsTransmit() || - (!_entity->getDynamic() && _entity->queryAACubeNeedsUpdate())) { + if (_entity->dynamicDataNeedsTransmit()) { return true; } - if (_entity->shouldSuppressLocationEdits()) { - return false; + // "shouldSuppressLocationEdits" really means: "the entity has a 'Hold' action therefore + // we don't need send an update unless the entity is not contained by its queryAACube" + return _entity->queryAACubeNeedsUpdate(); } return remoteSimulationOutOfSync(simulationStep);