don't always send actiondata along with other physics related properties

This commit is contained in:
Seth Alves 2015-11-13 09:25:17 -08:00
parent dbaea5770a
commit 7979fb38cf
2 changed files with 4 additions and 3 deletions

View file

@ -198,7 +198,6 @@ bool EntityTree::updateEntityWithElement(EntityItemPointer entity, const EntityI
properties.setVelocityChanged(false);
properties.setAngularVelocityChanged(false);
properties.setAccelerationChanged(false);
properties.setActionDataChanged(false);
if (wantTerseEditLogging()) {
qCDebug(entities) << senderNode->getUUID() << "physical edits suppressed";

View file

@ -294,7 +294,6 @@ bool EntityMotionState::remoteSimulationOutOfSync(uint32_t simulationStep) {
if (_entity->actionDataNeedsTransmit()) {
setOutgoingPriority(SCRIPT_EDIT_SIMULATION_PRIORITY);
_entity->setActionDataNeedsTransmit(false);
return true;
}
@ -457,7 +456,10 @@ void EntityMotionState::sendUpdate(OctreeEditPacketSender* packetSender, const Q
properties.setVelocity(_serverVelocity);
properties.setAcceleration(_serverAcceleration);
properties.setAngularVelocity(_serverAngularVelocity);
properties.setActionData(_serverActionData);
if (_entity->actionDataNeedsTransmit()) {
_entity->setActionDataNeedsTransmit(false);
properties.setActionData(_serverActionData);
}
// set the LastEdited of the properties but NOT the entity itself
quint64 now = usecTimestampNow();