adjust how the decision to send action changes over the wire is made

This commit is contained in:
Seth Alves 2015-11-12 17:36:45 -08:00
parent 756b382a75
commit ed8a604e13

View file

@ -244,7 +244,7 @@ bool EntityMotionState::isCandidateForOwnership(const QUuid& sessionID) const {
return false;
}
assert(entityTreeIsLocked());
return _outgoingPriority != NO_PRORITY || sessionID == _entity->getSimulatorID();
return _outgoingPriority != NO_PRORITY || sessionID == _entity->getSimulatorID() || _entity->actionDataNeedsTransmit();
}
bool EntityMotionState::remoteSimulationOutOfSync(uint32_t simulationStep) {
@ -298,6 +298,10 @@ bool EntityMotionState::remoteSimulationOutOfSync(uint32_t simulationStep) {
return true;
}
if (_entity->shouldSuppressLocationEdits()) {
return false;
}
// 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.