Merge pull request #14135 from ElderOrb/FB18573

FB18573 - Other avatars' avatar entities may appear to be successfull…
This commit is contained in:
Seth Alves 2018-11-16 10:05:22 -08:00 committed by GitHub
commit d19cdc62d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -954,11 +954,6 @@ void EntityScriptingInterface::deleteEntity(QUuid id) {
const QUuid myNodeID = nodeList->getSessionUUID();
if (entity->getClientOnly() && entity->getOwningAvatarID() != myNodeID) {
// don't delete other avatar's avatarEntities
// If you actually own the entity but the onwership property is not set because of a domain switch
// The lines below makes sure the entity is deleted once its properties are set.
auto avatarHashMap = DependencyManager::get<AvatarHashMap>();
AvatarSharedPointer myAvatar = avatarHashMap->getAvatarBySessionID(myNodeID);
myAvatar->insertDetachedEntityID(id);
shouldSendDeleteToServer = false;
return;
}