From 8d4ef28411d5d375ef2a1f9e3838d77fe52b516d Mon Sep 17 00:00:00 2001
From: Brad Hefta-Gaub <brad@highfidelity.io>
Date: Tue, 8 Mar 2016 15:29:04 -0800
Subject: [PATCH] CR feedback

---
 assignment-client/src/octree/OctreeSendThread.cpp | 6 +++++-
 libraries/entities/src/EntityTreeElement.cpp      | 4 +---
 2 files changed, 6 insertions(+), 4 deletions(-)

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());
                 }
             }
         }