relax 'isWearable' conditions to treat entities like 'ghost.json' as wearables

This commit is contained in:
Alexander Ivash 2018-10-09 00:17:19 +03:00
parent 91df342ae9
commit 19c3f1516f
2 changed files with 1 additions and 4 deletions

View file

@ -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<ModelEntityItem>(entity))->getRelayParentJoints()))
&& (entity->getParentID() == DependencyManager::get<NodeList>()->getSessionUUID()
|| entity->getParentID() == AVATAR_SELF_ID);
}

View file

@ -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);
}