mirror of
https://github.com/overte-org/overte.git
synced 2025-06-28 21:49:35 +02:00
relax 'isWearable' conditions to treat entities like 'ghost.json' as wearables
This commit is contained in:
parent
91df342ae9
commit
19c3f1516f
2 changed files with 1 additions and 4 deletions
|
@ -1765,8 +1765,6 @@ void MyAvatar::setSkeletonModelURL(const QUrl& skeletonModelURL) {
|
||||||
|
|
||||||
bool isWearableEntity(const EntityItemPointer& entity) {
|
bool isWearableEntity(const EntityItemPointer& entity) {
|
||||||
return entity->isVisible()
|
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() == DependencyManager::get<NodeList>()->getSessionUUID()
|
||||||
|| entity->getParentID() == AVATAR_SELF_ID);
|
|| entity->getParentID() == AVATAR_SELF_ID);
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,9 +28,8 @@ function executeLater(callback) {
|
||||||
Script.setTimeout(callback, 300);
|
Script.setTimeout(callback, 300);
|
||||||
}
|
}
|
||||||
|
|
||||||
var INVALID_JOINT_INDEX = -1
|
|
||||||
function isWearable(avatarEntity) {
|
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);
|
(avatarEntity.properties.parentID === MyAvatar.sessionUUID || avatarEntity.properties.parentID === MyAvatar.SELF_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue