From 756b382a75981593971073257de5d89233e0219c Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Thu, 12 Nov 2015 17:12:20 -0800 Subject: [PATCH] adjust how the decision to send action changes over the wire is made --- libraries/physics/src/EntityMotionState.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/libraries/physics/src/EntityMotionState.cpp b/libraries/physics/src/EntityMotionState.cpp index 66f5d46c18..877ea168aa 100644 --- a/libraries/physics/src/EntityMotionState.cpp +++ b/libraries/physics/src/EntityMotionState.cpp @@ -86,12 +86,12 @@ void EntityMotionState::updateServerPhysicsVariables(const QUuid& sessionID) { return; } - _serverActionData = _entity->getActionData(); _serverPosition = _entity->getPosition(); _serverRotation = _entity->getRotation(); _serverVelocity = _entity->getVelocity(); _serverAngularVelocity = _entity->getAngularVelocity(); _serverAcceleration = _entity->getAcceleration(); + _serverActionData = _entity->getActionData(); } // virtual @@ -298,10 +298,6 @@ bool EntityMotionState::remoteSimulationOutOfSync(uint32_t simulationStep) { return true; } - if (_entity->shouldSuppressLocationEdits()) { - return false; - } - // Else we measure the error between current and extrapolated transform (according to expected behavior // of remote EntitySimulation) and return true if the error is significant. @@ -441,8 +437,6 @@ void EntityMotionState::sendUpdate(OctreeEditPacketSender* packetSender, const Q _sentInactive = false; } - EntityItemProperties properties; - // remember properties for local server prediction _serverPosition = _entity->getPosition(); _serverRotation = _entity->getRotation(); @@ -451,6 +445,8 @@ void EntityMotionState::sendUpdate(OctreeEditPacketSender* packetSender, const Q _serverAngularVelocity = _entity->getAngularVelocity(); _serverActionData = _entity->getActionData(); + EntityItemProperties properties; + // explicitly set the properties that changed so that they will be packed properties.setPosition(_serverPosition); properties.setRotation(_serverRotation);