mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 12:23:24 +02:00
add check for SELF_ID
This commit is contained in:
parent
849c91d8f6
commit
f5717b7648
2 changed files with 4 additions and 2 deletions
|
@ -145,7 +145,8 @@ void AvatarBookmarks::removeBookmark(const QString& bookmarkName) {
|
|||
}
|
||||
|
||||
bool isWearableEntity(const EntityItemPointer& entity) {
|
||||
return entity->isVisible() && entity->getParentJointIndex() != INVALID_JOINT_INDEX && entity->getParentID() == DependencyManager::get<NodeList>()->getSessionUUID();
|
||||
return entity->isVisible() && entity->getParentJointIndex() != INVALID_JOINT_INDEX &&
|
||||
(entity->getParentID() == DependencyManager::get<NodeList>()->getSessionUUID() || entity->getParentID() == DependencyManager::get<AvatarManager>()->getMyAvatar()->getSelfID());
|
||||
}
|
||||
|
||||
void AvatarBookmarks::updateAvatarEntities(const QVariantList &avatarEntities) {
|
||||
|
|
|
@ -31,7 +31,8 @@ function executeLater(callback) {
|
|||
|
||||
var INVALID_JOINT_INDEX = -1
|
||||
function isWearable(avatarEntity) {
|
||||
return avatarEntity.properties.visible === true && avatarEntity.properties.parentJointIndex !== INVALID_JOINT_INDEX && avatarEntity.properties.parentID === MyAvatar.sessionUUID;
|
||||
return avatarEntity.properties.visible === true && avatarEntity.properties.parentJointIndex !== INVALID_JOINT_INDEX &&
|
||||
(avatarEntity.properties.parentID === MyAvatar.sessionUUID || avatarEntity.properties.parentID === MyAvatar.SELF_ID);
|
||||
}
|
||||
|
||||
function getMyAvatarWearables() {
|
||||
|
|
Loading…
Reference in a new issue