Improve code per HiFiExperiments' suggestions.

This commit is contained in:
Kasen IO 2020-06-30 15:46:26 -04:00
parent 12446bdb45
commit d9e0605b4d
2 changed files with 5 additions and 4 deletions

View file

@ -4065,7 +4065,7 @@ std::map<QString, QString> Application::prepareServerlessDomainContents(QUrl dom
bool success = tmpTree->readFromByteArray(domainURL.toString(), data);
if (success) {
tmpTree->reaverageOctreeElements();
tmpTree->sendEntities(&_entityEditSender, getEntities()->getTree(), nullptr, 0, 0, 0);
tmpTree->sendEntities(&_entityEditSender, getEntities()->getTree(), "domain", 0, 0, 0);
}
std::map<QString, QString> namedPaths = tmpTree->getNamedPaths();

View file

@ -2751,9 +2751,10 @@ bool EntityTree::sendEntitiesOperation(const OctreeElementPointer& element, void
EntityItemID oldID = item->getEntityItemID();
EntityItemID newID = getMapped(oldID);
EntityItemProperties properties = item->getProperties();
if (args->entityHostType != nullptr) {
properties.setEntityHostTypeFromString(args->entityHostType);
properties.setEntityHostTypeFromString(args->entityHostType);
if (properties.getEntityHostType() == entity::HostType::AVATAR) {
properties.setOwningAvatarID(AVATAR_SELF_ID);
}
EntityItemID oldParentID = properties.getParentID();