mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-09 19:12:15 +02:00
fix avatar loading spheres
This commit is contained in:
parent
024dfbf8b7
commit
3273f46179
3 changed files with 14 additions and 13 deletions
|
@ -412,7 +412,7 @@ AvatarSharedPointer AvatarManager::newSharedAvatar(const QUuid& sessionUUID) {
|
|||
auto otherAvatar = new OtherAvatar(qApp->thread());
|
||||
otherAvatar->setSessionUUID(sessionUUID);
|
||||
auto nodeList = DependencyManager::get<NodeList>();
|
||||
if (!nodeList || !nodeList->isIgnoringNode(sessionUUID)) {
|
||||
if (nodeList && !nodeList->isIgnoringNode(sessionUUID)) {
|
||||
otherAvatar->createOrb();
|
||||
}
|
||||
return AvatarSharedPointer(otherAvatar, [](OtherAvatar* ptr) { ptr->deleteLater(); });
|
||||
|
|
|
@ -62,7 +62,7 @@ void OtherAvatar::removeOrb() {
|
|||
}
|
||||
|
||||
void OtherAvatar::updateOrbPosition() {
|
||||
if (_otherAvatarOrbMeshPlaceholderID.isNull()) {
|
||||
if (!_otherAvatarOrbMeshPlaceholderID.isNull()) {
|
||||
EntityItemProperties properties;
|
||||
properties.setPosition(getHead()->getPosition());
|
||||
DependencyManager::get<EntityScriptingInterface>()->editEntity(_otherAvatarOrbMeshPlaceholderID, properties);
|
||||
|
|
|
@ -1519,18 +1519,19 @@ void Avatar::scaleVectorRelativeToPosition(glm::vec3 &positionToScale) const {
|
|||
}
|
||||
|
||||
void Avatar::setSkeletonModelURL(const QUrl& skeletonModelURL) {
|
||||
AvatarData::setSkeletonModelURL(skeletonModelURL);
|
||||
if (QThread::currentThread() == thread()) {
|
||||
|
||||
if (!isMyAvatar() && !DependencyManager::get<NodeList>()->isIgnoringNode(getSessionUUID())) {
|
||||
createOrb();
|
||||
}
|
||||
|
||||
_skeletonModel->setURL(_skeletonModelURL);
|
||||
indicateLoadingStatus(LoadingStatus::LoadModel);
|
||||
} else {
|
||||
QMetaObject::invokeMethod(_skeletonModel.get(), "setURL", Qt::QueuedConnection, Q_ARG(QUrl, _skeletonModelURL));
|
||||
if (QThread::currentThread() != thread()) {
|
||||
QMetaObject::invokeMethod(this, "setSkeletonModelURL", Q_ARG(const QUrl&, skeletonModelURL));
|
||||
return;
|
||||
}
|
||||
|
||||
AvatarData::setSkeletonModelURL(skeletonModelURL);
|
||||
|
||||
if (!isMyAvatar() && !DependencyManager::get<NodeList>()->isIgnoringNode(getSessionUUID())) {
|
||||
createOrb();
|
||||
}
|
||||
indicateLoadingStatus(LoadingStatus::LoadModel);
|
||||
|
||||
_skeletonModel->setURL(_skeletonModelURL);
|
||||
}
|
||||
|
||||
void Avatar::setModelURLFinished(bool success) {
|
||||
|
|
Loading…
Reference in a new issue