History

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

Seth Alves committed 11 years ago

Commit 7979fb31 parent dbaea572 files · +4 −3Browse files

Unified · Split

2 files
  1. libraries/entities/src/EntityTree.cpp +0 −1
  2. libraries/physics/src/EntityMotionState.cpp +4 −2
libraries/entities/src/EntityTree.cpp+0−1
@@ -198,7 +198,6 @@ bool EntityTree::updateEntityWithElement(EntityItemPointer entity, const EntityI · 197 unmodified lines
198198 properties.setVelocityChanged(false);
199199 properties.setAngularVelocityChanged(false);
200200 properties.setAccelerationChanged(false);
201− properties.setActionDataChanged(false);
202201
203202 if (wantTerseEditLogging()) {
204203 qCDebug(entities) << senderNode->getUUID() << "physical edits suppressed";
libraries/physics/src/EntityMotionState.cpp+4−2
@@ -294,7 +294,6 @@ bool EntityMotionState::remoteSimulationOutOfSync(uint32_t simulationStep) { · 293 unmodified lines
294294
295295 if (_entity->actionDataNeedsTransmit()) {
296296 setOutgoingPriority(SCRIPT_EDIT_SIMULATION_PRIORITY);
297− _entity->setActionDataNeedsTransmit(false);
298297 return true;
299298 }
300299
@@ -457,7 +456,10 @@ void EntityMotionState::sendUpdate(OctreeEditPacketSender* packetSender, const Q · 156 unmodified lines
457456 properties.setVelocity(_serverVelocity);
458457 properties.setAcceleration(_serverAcceleration);
459458 properties.setAngularVelocity(_serverAngularVelocity);
460− properties.setActionData(_serverActionData);
459+ if (_entity->actionDataNeedsTransmit()) {
460+ _entity->setActionDataNeedsTransmit(false);
461+ properties.setActionData(_serverActionData);
462+ }
461463
462464 // set the LastEdited of the properties but NOT the entity itself
463465 quint64 now = usecTimestampNow();