FB18573 - Other avatars' avatar entities may appear to be successfully deleted until edited

note: partially revert commit 888f2f64a5 / "Merge pull request #10981 from druiz17/bug/delete-avatar-entity
This commit is contained in:
Alexander Ivash 2018-10-03 02:55:33 +03:00
parent 898ba20f1c
commit 9cf94c968a

View file

@ -712,11 +712,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;
}