From 91a2f86482667b7c300b778e3a620d595d89ee67 Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Thu, 4 Feb 2016 13:22:26 -0800 Subject: [PATCH] update some comments --- libraries/physics/src/PhysicalEntitySimulation.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/physics/src/PhysicalEntitySimulation.cpp b/libraries/physics/src/PhysicalEntitySimulation.cpp index d5e8d972fe..71c78b8b86 100644 --- a/libraries/physics/src/PhysicalEntitySimulation.cpp +++ b/libraries/physics/src/PhysicalEntitySimulation.cpp @@ -274,13 +274,15 @@ void PhysicalEntitySimulation::handleOutgoingChanges(const VectorOfMotionStates& return; } - // look for entities that need outgoing packets + // look for entities to prune or update QSet::iterator stateItr = _outgoingChanges.begin(); while (stateItr != _outgoingChanges.end()) { EntityMotionState* state = *stateItr; if (!state->isCandidateForOwnership(sessionID)) { + // prune stateItr = _outgoingChanges.erase(stateItr); } else if (state->shouldSendUpdate(numSubsteps, sessionID)) { + // update state->sendUpdate(_entityPacketSender, sessionID, numSubsteps); ++stateItr; } else {