diff --git a/libraries/entities/src/EntityTree.cpp b/libraries/entities/src/EntityTree.cpp index 619cd9781f..ee6ba3469b 100644 --- a/libraries/entities/src/EntityTree.cpp +++ b/libraries/entities/src/EntityTree.cpp @@ -42,7 +42,7 @@ static const quint64 DELETED_ENTITIES_EXTRA_USECS_TO_CONSIDER = USECS_PER_MSEC * 50; const float EntityTree::DEFAULT_MAX_TMP_ENTITY_LIFETIME = 60 * 60; // 1 hour -static const QString DOMAIN_UNLIMITED = "domainUnlimitied"; +static const QString DOMAIN_UNLIMITED = "domainUnlimited"; EntityTree::EntityTree(bool shouldReaverage) : Octree(shouldReaverage) @@ -293,7 +293,7 @@ void EntityTree::postAddEntity(EntityItemPointer entity) { { QWriteLocker locker(&_entityCertificateIDMapLock); existingEntityItemID = _entityCertificateIDMap.value(certID); - if (!certID.isEmpty() && !entity->getCertificateType().contains(DOMAIN_UNLIMITED)) { + if (!certID.isEmpty()) { _entityCertificateIDMap.insert(certID, entityItemID); qCDebug(entities) << "Certificate ID" << certID << "belongs to" << entityItemID; } @@ -301,7 +301,7 @@ void EntityTree::postAddEntity(EntityItemPointer entity) { // Delete an already-existing entity from the tree if it has the same // CertificateID as the entity we're trying to add. - if (!existingEntityItemID.isNull()) { + if (!existingEntityItemID.isNull() && !entity->getCertificateType().contains(DOMAIN_UNLIMITED)) { qCDebug(entities) << "Certificate ID" << certID << "already exists on entity with ID" << existingEntityItemID << ". Deleting existing entity."; deleteEntity(existingEntityItemID, true);