diff --git a/assignment-client/src/octree/OctreeSendThread.cpp b/assignment-client/src/octree/OctreeSendThread.cpp index 02526280d4..ec812db8e8 100644 --- a/assignment-client/src/octree/OctreeSendThread.cpp +++ b/assignment-client/src/octree/OctreeSendThread.cpp @@ -583,12 +583,16 @@ int OctreeSendThread::packetDistributor(SharedNodePointer node, OctreeQueryNode* nodeData->updateLastKnownViewFrustum(); nodeData->setViewSent(true); + // If this was a full scene then make sure we really send out a stats packet at this point so that + // the clients will know the scene is stable if (isFullScene) { int thisTrueBytesSent = 0; int thisTruePacketsSent = 0; nodeData->stats.sceneCompleted(); - // FIXME - are we accounting for packets sent correctly here???? int packetsJustSent = handlePacketSend(node, nodeData, thisTrueBytesSent, thisTruePacketsSent, true); + _totalBytes += thisTrueBytesSent; + _totalPackets += thisTruePacketsSent; + truePacketsSent += packetsJustSent; } } diff --git a/libraries/entities/src/EntityTreeElement.cpp b/libraries/entities/src/EntityTreeElement.cpp index f37cb2ce4f..6f9880171b 100644 --- a/libraries/entities/src/EntityTreeElement.cpp +++ b/libraries/entities/src/EntityTreeElement.cpp @@ -351,9 +351,7 @@ OctreeElement::AppendState EntityTreeElement::appendElementData(OctreePacketData } else { // if the extra data included this entity, and we've decided to not include the entity, then // we can treat it as if it was completed. - if (entityTreeElementExtraEncodeData->entities.contains(entity->getEntityItemID())) { - entityTreeElementExtraEncodeData->entities.remove(entity->getEntityItemID()); - } + entityTreeElementExtraEncodeData->entities.remove(entity->getEntityItemID()); } } }