mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 07:09:47 +02:00
adjust how EntityMotionState updates its idea of what the server knows about an entity
This commit is contained in:
parent
82bd506086
commit
e067195dfe
1 changed files with 9 additions and 6 deletions
|
@ -86,6 +86,8 @@ void EntityMotionState::updateServerPhysicsVariables(const QUuid& sessionID) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_serverActionData = _entity->getActionData();
|
||||||
|
|
||||||
if (_entity->shouldSuppressLocationEdits()) {
|
if (_entity->shouldSuppressLocationEdits()) {
|
||||||
// if we send now, the changes will be ignored, so don't update our idea of what the server knows.
|
// if we send now, the changes will be ignored, so don't update our idea of what the server knows.
|
||||||
return;
|
return;
|
||||||
|
@ -96,7 +98,6 @@ void EntityMotionState::updateServerPhysicsVariables(const QUuid& sessionID) {
|
||||||
_serverVelocity = _entity->getVelocity();
|
_serverVelocity = _entity->getVelocity();
|
||||||
_serverAngularVelocity = _entity->getAngularVelocity();
|
_serverAngularVelocity = _entity->getAngularVelocity();
|
||||||
_serverAcceleration = _entity->getAcceleration();
|
_serverAcceleration = _entity->getAcceleration();
|
||||||
_serverActionData = _entity->getActionData();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
|
@ -446,11 +447,13 @@ void EntityMotionState::sendUpdate(OctreeEditPacketSender* packetSender, const Q
|
||||||
}
|
}
|
||||||
|
|
||||||
// remember properties for local server prediction
|
// remember properties for local server prediction
|
||||||
_serverPosition = _entity->getPosition();
|
if (!_entity->shouldSuppressLocationEdits()) {
|
||||||
_serverRotation = _entity->getRotation();
|
_serverPosition = _entity->getPosition();
|
||||||
_serverVelocity = _entity->getVelocity();
|
_serverRotation = _entity->getRotation();
|
||||||
_serverAcceleration = _entity->getAcceleration();
|
_serverVelocity = _entity->getVelocity();
|
||||||
_serverAngularVelocity = _entity->getAngularVelocity();
|
_serverAcceleration = _entity->getAcceleration();
|
||||||
|
_serverAngularVelocity = _entity->getAngularVelocity();
|
||||||
|
}
|
||||||
_serverActionData = _entity->getActionData();
|
_serverActionData = _entity->getActionData();
|
||||||
|
|
||||||
EntityItemProperties properties;
|
EntityItemProperties properties;
|
||||||
|
|
Loading…
Reference in a new issue