This commit is contained in:
Seth Alves 2015-10-13 12:52:53 -07:00
parent 83780296de
commit 54eac099b9
2 changed files with 7 additions and 4 deletions

View file

@ -1795,4 +1795,6 @@ bool EntityItem::shouldSuppressEdits() const {
// XXX // XXX
return true; return true;
} }
return false;
} }

View file

@ -280,6 +280,11 @@ bool EntityMotionState::remoteSimulationOutOfSync(uint32_t simulationStep) {
} }
_lastStep = simulationStep; _lastStep = simulationStep;
if (_entity->shouldSuppressEdits()) {
return false;
}
if (glm::length2(_serverVelocity) > 0.0f) { if (glm::length2(_serverVelocity) > 0.0f) {
_serverVelocity += _serverAcceleration * dt; _serverVelocity += _serverAcceleration * dt;
_serverVelocity *= powf(1.0f - _body->getLinearDamping(), dt); _serverVelocity *= powf(1.0f - _body->getLinearDamping(), dt);
@ -291,10 +296,6 @@ bool EntityMotionState::remoteSimulationOutOfSync(uint32_t simulationStep) {
return true; return true;
} }
if (_entity->shouldSuppressEdits()) {
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.