From cf3d1011f463e5d471f2e0500796764fd41a0e14 Mon Sep 17 00:00:00 2001 From: Brad Hefta-Gaub Date: Wed, 9 Nov 2016 12:26:57 -0800 Subject: [PATCH 1/2] remove scripts from avatar attached entities for other avatars --- interface/src/avatar/Avatar.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/interface/src/avatar/Avatar.cpp b/interface/src/avatar/Avatar.cpp index 0366d566d2..7114e81b3b 100644 --- a/interface/src/avatar/Avatar.cpp +++ b/interface/src/avatar/Avatar.cpp @@ -235,6 +235,14 @@ void Avatar::updateAvatarEntities() { properties.setParentID(getID()); } + // NOTE: if this avatar entity is not attached to us, strip it's entity script completely... + auto attachedScript = properties.getScript(); + if (!isMyAvatar() && !attachedScript.isEmpty()) { + qCDebug(interfaceapp) << "removing entity script from avatar attached entity:" << entityID << "old script:" << attachedScript; + QString noScript; + properties.setScript(noScript); + } + EntityItemPointer entity = entityTree->findEntityByEntityItemID(EntityItemID(entityID)); if (entity) { From 770bf35d2b57253e1eaba9a63746223ffe068f3f Mon Sep 17 00:00:00 2001 From: Brad Hefta-Gaub Date: Wed, 9 Nov 2016 14:31:18 -0800 Subject: [PATCH 2/2] CR feedback --- interface/src/avatar/Avatar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/src/avatar/Avatar.cpp b/interface/src/avatar/Avatar.cpp index 7114e81b3b..872d2af04e 100644 --- a/interface/src/avatar/Avatar.cpp +++ b/interface/src/avatar/Avatar.cpp @@ -235,7 +235,7 @@ void Avatar::updateAvatarEntities() { properties.setParentID(getID()); } - // NOTE: if this avatar entity is not attached to us, strip it's entity script completely... + // NOTE: if this avatar entity is not attached to us, strip its entity script completely... auto attachedScript = properties.getScript(); if (!isMyAvatar() && !attachedScript.isEmpty()) { qCDebug(interfaceapp) << "removing entity script from avatar attached entity:" << entityID << "old script:" << attachedScript;