mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:44:02 +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;
|
||||
}
|
||||
|
||||
_serverActionData = _entity->getActionData();
|
||||
|
||||
if (_entity->shouldSuppressLocationEdits()) {
|
||||
// if we send now, the changes will be ignored, so don't update our idea of what the server knows.
|
||||
return;
|
||||
|
@ -96,7 +98,6 @@ void EntityMotionState::updateServerPhysicsVariables(const QUuid& sessionID) {
|
|||
_serverVelocity = _entity->getVelocity();
|
||||
_serverAngularVelocity = _entity->getAngularVelocity();
|
||||
_serverAcceleration = _entity->getAcceleration();
|
||||
_serverActionData = _entity->getActionData();
|
||||
}
|
||||
|
||||
// virtual
|
||||
|
@ -446,11 +447,13 @@ void EntityMotionState::sendUpdate(OctreeEditPacketSender* packetSender, const Q
|
|||
}
|
||||
|
||||
// remember properties for local server prediction
|
||||
_serverPosition = _entity->getPosition();
|
||||
_serverRotation = _entity->getRotation();
|
||||
_serverVelocity = _entity->getVelocity();
|
||||
_serverAcceleration = _entity->getAcceleration();
|
||||
_serverAngularVelocity = _entity->getAngularVelocity();
|
||||
if (!_entity->shouldSuppressLocationEdits()) {
|
||||
_serverPosition = _entity->getPosition();
|
||||
_serverRotation = _entity->getRotation();
|
||||
_serverVelocity = _entity->getVelocity();
|
||||
_serverAcceleration = _entity->getAcceleration();
|
||||
_serverAngularVelocity = _entity->getAngularVelocity();
|
||||
}
|
||||
_serverActionData = _entity->getActionData();
|
||||
|
||||
EntityItemProperties properties;
|
||||
|
|
Loading…
Reference in a new issue