move variables into block that needs them

This commit is contained in:
Seth Alves 2017-10-06 11:02:26 -07:00
parent 8d00731620
commit f4dedf05bb

View file

@ -1941,9 +1941,9 @@ bool EntityTree::readFromMap(QVariantMap& map) {
entityItemID = EntityItemID(QUuid::createUuid());
}
auto nodeList = DependencyManager::get<NodeList>();
const QUuid myNodeID = nodeList->getSessionUUID();
if (properties.getClientOnly()) {
auto nodeList = DependencyManager::get<NodeList>();
const QUuid myNodeID = nodeList->getSessionUUID();
properties.setOwningAvatarID(myNodeID);
}