From 19c3f1516f4bc4b572bf4eea8ed4d9dc4879e0be Mon Sep 17 00:00:00 2001 From: Alexander Ivash Date: Tue, 9 Oct 2018 00:17:19 +0300 Subject: [PATCH] relax 'isWearable' conditions to treat entities like 'ghost.json' as wearables --- interface/src/avatar/MyAvatar.cpp | 2 -- scripts/system/avatarapp.js | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/interface/src/avatar/MyAvatar.cpp b/interface/src/avatar/MyAvatar.cpp index b347963cf1..f683e518e9 100755 --- a/interface/src/avatar/MyAvatar.cpp +++ b/interface/src/avatar/MyAvatar.cpp @@ -1765,8 +1765,6 @@ void MyAvatar::setSkeletonModelURL(const QUrl& skeletonModelURL) { bool isWearableEntity(const EntityItemPointer& entity) { return entity->isVisible() - && (entity->getParentJointIndex() != INVALID_JOINT_INDEX - || (entity->getType() == EntityTypes::Model && (std::static_pointer_cast(entity))->getRelayParentJoints())) && (entity->getParentID() == DependencyManager::get()->getSessionUUID() || entity->getParentID() == AVATAR_SELF_ID); } diff --git a/scripts/system/avatarapp.js b/scripts/system/avatarapp.js index 10ccb66d96..858671badf 100644 --- a/scripts/system/avatarapp.js +++ b/scripts/system/avatarapp.js @@ -28,9 +28,8 @@ function executeLater(callback) { Script.setTimeout(callback, 300); } -var INVALID_JOINT_INDEX = -1 function isWearable(avatarEntity) { - return avatarEntity.properties.visible === true && (avatarEntity.properties.parentJointIndex !== INVALID_JOINT_INDEX || avatarEntity.properties.relayParentJoints === true) && + return avatarEntity.properties.visible === true && (avatarEntity.properties.parentID === MyAvatar.sessionUUID || avatarEntity.properties.parentID === MyAvatar.SELF_ID); }