save avatar-entities which are created while using a serverless domain

This commit is contained in:
Seth Alves 2018-02-23 16:03:08 -08:00
parent 3be1988260
commit 77febe0aab
2 changed files with 8 additions and 4 deletions

View file

@ -3061,7 +3061,9 @@ void Application::loadServerlessDomain(QUrl domainURL) {
return;
}
getMyAvatar()->setSessionUUID(QUuid::createUuid());
QUuid serverlessSessionID = QUuid::createUuid();
getMyAvatar()->setSessionUUID(serverlessSessionID);
DependencyManager::get<NodeList>()->setSessionUUID(serverlessSessionID);
auto addressManager = DependencyManager::get<AddressManager>();
addressManager->handleLookupString(DOMAIN_SPAWNING_POINT);

View file

@ -219,8 +219,10 @@ void Avatar::updateAvatarEntities() {
return;
}
if (getID() == QUuid() || getID() == AVATAR_SELF_ID) {
return; // wait until MyAvatar gets an ID before doing this.
if (getID() == QUuid() ||
getID() == AVATAR_SELF_ID ||
DependencyManager::get<NodeList>()->getSessionUUID() == QUuid()) {
return; // wait until MyAvatar and this Node gets an ID before doing this.
}
auto treeRenderer = DependencyManager::get<EntityTreeRenderer>();
@ -1789,4 +1791,4 @@ void Avatar::processMaterials() {
material.pop();
}
}
}
}