mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-04 12:46:57 +02:00
sync
This commit is contained in:
parent
926694517f
commit
a27f8f3f10
2 changed files with 4 additions and 2 deletions
|
@ -314,6 +314,7 @@ int EntityItem::readEntityDataFromBuffer(const unsigned char* data, int bytesLef
|
|||
glm::vec3 savePosition = _position;
|
||||
glm::quat saveRotation = _rotation;
|
||||
glm::vec3 saveVelocity = _velocity;
|
||||
glm::vec3 saveAngularVelocity = _angularVelocity;
|
||||
glm::vec3 saveGravity = _gravity;
|
||||
glm::vec3 saveAcceleration = _acceleration;
|
||||
|
||||
|
@ -616,6 +617,7 @@ int EntityItem::readEntityDataFromBuffer(const unsigned char* data, int bytesLef
|
|||
_position = savePosition;
|
||||
_rotation = saveRotation;
|
||||
_velocity = saveVelocity;
|
||||
_angularVelocity = saveAngularVelocity;
|
||||
_gravity = saveGravity;
|
||||
_acceleration = saveAcceleration;
|
||||
}
|
||||
|
|
|
@ -211,7 +211,7 @@ bool EntityMotionState::shouldSendUpdate(uint32_t simulationFrame) {
|
|||
const QUuid& myNodeID = nodeList->getSessionUUID();
|
||||
const QUuid& simulatorID = _entity->getSimulatorID();
|
||||
|
||||
if (simulatorID != myNodeID /* && !simulatorID.isNull() */) {
|
||||
if (simulatorID != myNodeID && !simulatorID.isNull()) {
|
||||
// some other Node owns the simulating of this, so don't broadcast the results of local simulation.
|
||||
return false;
|
||||
}
|
||||
|
@ -300,7 +300,7 @@ void EntityMotionState::sendUpdate(OctreeEditPacketSender* packetSender, uint32_
|
|||
// }
|
||||
|
||||
if (getShouldClaimSimulationOwnership()) {
|
||||
// _entity->setSimulatorID(myNodeID);
|
||||
_entity->setSimulatorID(myNodeID);
|
||||
properties.setSimulatorID(myNodeID);
|
||||
setShouldClaimSimulationOwnership(false);
|
||||
} else if (simulatorID == myNodeID && zeroSpeed && zeroSpin) {
|
||||
|
|
Loading…
Reference in a new issue