add extra cleanup in delete messages and simulation, as a fall back

This commit is contained in:
Liv Erickson 2018-05-18 18:18:42 -07:00
parent 29b11b9101
commit 6c8d68afc6
2 changed files with 2 additions and 0 deletions

View file

@ -65,6 +65,7 @@ void EntitySimulation::prepareEntityForDelete(EntityItemPointer entity) {
removeEntityInternal(entity);
if (entity->getElement()) {
_deadEntities.insert(entity);
_entityTree->cleanupCloneIDs(entity->getEntityItemID());
}
}
}

View file

@ -1990,6 +1990,7 @@ int EntityTree::processEraseMessage(ReceivedMessage& message, const SharedNodePo
if (shouldEraseEntity(entityID, sourceNode)) {
entityItemIDsToDelete << entityItemID;
cleanupCloneIDs(entityItemID);
}
}
deleteEntities(entityItemIDsToDelete, true, true);