Merge pull request #24 from druiz17/serverless-domains

Some bug fixes
This commit is contained in:
Seth Alves 2018-02-26 15:25:59 -08:00 committed by GitHub
commit 642e7b7c37
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View file

@ -3039,6 +3039,7 @@ bool Application::importFromZIP(const QString& filePath) {
void Application::setServersEnabled(bool serversEnabled) {
if (_serversEnabled != serversEnabled) {
_serversEnabled = serversEnabled;
getEntities()->getTree()->setIsServerlessMode(!_serversEnabled);
}
}
@ -3072,7 +3073,6 @@ void Application::loadServerlessDomain(QUrl domainURL) {
permissions.setAll(true);
DependencyManager::get<NodeList>()->setPermissions(permissions);
getEntities()->getTree()->setIsServerlessMode(true);
getEntities()->getTree()->eraseAllOctreeElements();
if (importEntities(domainURL.toString())) {
pasteEntities(0.0f, 0.0f, 0.0f);
@ -5789,7 +5789,6 @@ void Application::clearDomainAvatars() {
void Application::domainChanged(const QString& domainHostname) {
clearDomainOctreeDetails();
getEntities()->getTree()->setIsServerlessMode(isServerlessMode());
updateWindowTitle();
// disable physics until we have enough information about our new location to not cause craziness.
resetPhysicsReadyInformation();

View file

@ -1264,10 +1264,10 @@ bool EntityScriptingInterface::actionWorker(const QUuid& entityID,
}
doTransmit = actor(simulation, entity);
_entityTree->entityChanged(entity);
if (doTransmit) {
properties.setClientOnly(entity->getClientOnly());
properties.setOwningAvatarID(entity->getOwningAvatarID());
_entityTree->entityChanged(entity);
}
});