Merge pull request #9038 from ZappoMan/avatarEntityGreifingVector

remove scripts from avatar attached entities for other avatars
This commit is contained in:
Seth Alves 2016-11-09 14:31:52 -08:00 committed by GitHub
commit a907d1b5b3

View file

@ -235,6 +235,14 @@ void Avatar::updateAvatarEntities() {
properties.setParentID(getID());
}
// 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;
QString noScript;
properties.setScript(noScript);
}
EntityItemPointer entity = entityTree->findEntityByEntityItemID(EntityItemID(entityID));
if (entity) {