mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-06 03:54:25 +02:00
adjust how the decision to send action changes over the wire is made
This commit is contained in:
parent
6f83f32ecc
commit
756b382a75
1 changed files with 3 additions and 7 deletions
|
@ -86,12 +86,12 @@ void EntityMotionState::updateServerPhysicsVariables(const QUuid& sessionID) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_serverActionData = _entity->getActionData();
|
|
||||||
_serverPosition = _entity->getPosition();
|
_serverPosition = _entity->getPosition();
|
||||||
_serverRotation = _entity->getRotation();
|
_serverRotation = _entity->getRotation();
|
||||||
_serverVelocity = _entity->getVelocity();
|
_serverVelocity = _entity->getVelocity();
|
||||||
_serverAngularVelocity = _entity->getAngularVelocity();
|
_serverAngularVelocity = _entity->getAngularVelocity();
|
||||||
_serverAcceleration = _entity->getAcceleration();
|
_serverAcceleration = _entity->getAcceleration();
|
||||||
|
_serverActionData = _entity->getActionData();
|
||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
|
@ -298,10 +298,6 @@ bool EntityMotionState::remoteSimulationOutOfSync(uint32_t simulationStep) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_entity->shouldSuppressLocationEdits()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Else we measure the error between current and extrapolated transform (according to expected behavior
|
// 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.
|
// of remote EntitySimulation) and return true if the error is significant.
|
||||||
|
|
||||||
|
@ -441,8 +437,6 @@ void EntityMotionState::sendUpdate(OctreeEditPacketSender* packetSender, const Q
|
||||||
_sentInactive = false;
|
_sentInactive = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
EntityItemProperties properties;
|
|
||||||
|
|
||||||
// remember properties for local server prediction
|
// remember properties for local server prediction
|
||||||
_serverPosition = _entity->getPosition();
|
_serverPosition = _entity->getPosition();
|
||||||
_serverRotation = _entity->getRotation();
|
_serverRotation = _entity->getRotation();
|
||||||
|
@ -451,6 +445,8 @@ void EntityMotionState::sendUpdate(OctreeEditPacketSender* packetSender, const Q
|
||||||
_serverAngularVelocity = _entity->getAngularVelocity();
|
_serverAngularVelocity = _entity->getAngularVelocity();
|
||||||
_serverActionData = _entity->getActionData();
|
_serverActionData = _entity->getActionData();
|
||||||
|
|
||||||
|
EntityItemProperties properties;
|
||||||
|
|
||||||
// explicitly set the properties that changed so that they will be packed
|
// explicitly set the properties that changed so that they will be packed
|
||||||
properties.setPosition(_serverPosition);
|
properties.setPosition(_serverPosition);
|
||||||
properties.setRotation(_serverRotation);
|
properties.setRotation(_serverRotation);
|
||||||
|
|
Loading…
Reference in a new issue