mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 08:21:24 +02:00
Merge pull request #9038 from ZappoMan/avatarEntityGreifingVector
remove scripts from avatar attached entities for other avatars
This commit is contained in:
commit
a907d1b5b3
1 changed files with 8 additions and 0 deletions
|
@ -235,6 +235,14 @@ void Avatar::updateAvatarEntities() {
|
||||||
properties.setParentID(getID());
|
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));
|
EntityItemPointer entity = entityTree->findEntityByEntityItemID(EntityItemID(entityID));
|
||||||
|
|
||||||
if (entity) {
|
if (entity) {
|
||||||
|
|
Loading…
Reference in a new issue