CR feedback and some cleanup

This commit is contained in:
Brad Hefta-Gaub 2015-11-11 14:21:14 -08:00
parent bdfe304f7a
commit 2f903a9513
3 changed files with 3 additions and 8 deletions

View file

@ -18,8 +18,6 @@
class EntityNodeData : public OctreeQueryNode {
public:
EntityNodeData() : OctreeQueryNode() { }
virtual PacketType getMyPacketType() const { return PacketType::EntityData; }
quint64 getLastDeletedEntitiesSentAt() const { return _lastDeletedEntitiesSentAt; }

View file

@ -25,7 +25,7 @@
#include "RecurseOctreeToMapOperator.h"
#include "LogHandler.h"
const quint64 EntityTree::DELETED_ENTITIES_EXTRA_USECS_TO_CONSIDER = USECS_PER_MSEC * 50;
static const quint64 DELETED_ENTITIES_EXTRA_USECS_TO_CONSIDER = USECS_PER_MSEC * 50;
EntityTree::EntityTree(bool shouldReaverage) :
Octree(shouldReaverage),
@ -392,10 +392,8 @@ void EntityTree::processRemovedEntities(const DeleteEntityOperator& theOperator)
if (getIsServer()) {
// set up the deleted entities ID
{
QWriteLocker locker(&_recentlyDeletedEntitiesLock);
_recentlyDeletedEntityItemIDs.insert(deletedAt, theEntity->getEntityItemID());
}
QWriteLocker locker(&_recentlyDeletedEntitiesLock);
_recentlyDeletedEntityItemIDs.insert(deletedAt, theEntity->getEntityItemID());
}
if (_simulation) {

View file

@ -147,7 +147,6 @@ public:
void addNewlyCreatedHook(NewlyCreatedEntityHook* hook);
void removeNewlyCreatedHook(NewlyCreatedEntityHook* hook);
static const quint64 DELETED_ENTITIES_EXTRA_USECS_TO_CONSIDER;
bool hasAnyDeletedEntities() const { return _recentlyDeletedEntityItemIDs.size() > 0; }
bool hasEntitiesDeletedSince(quint64 sinceTime);
std::unique_ptr<NLPacket> encodeEntitiesDeletedSince(OCTREE_PACKET_SEQUENCE sequenceNumber, quint64& sinceTime,