Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 3 files). Show all
Unified · Split
| @@ -502,6 +502,8 @@ void EntityScriptingInterface::deleteEntity(QUuid id) { · 501 unmodified lines | |||
| 502 | AvatarSharedPointer myAvatar = avatarHashMap->getAvatarBySessionID(myNodeID); | 502 | AvatarSharedPointer myAvatar = avatarHashMap->getAvatarBySessionID(myNodeID); |
| 503 | if (entity->getClientOnly() && entity->getOwningAvatarID() != myNodeID) { | 503 | if (entity->getClientOnly() && entity->getOwningAvatarID() != myNodeID) { |
| 504 | // don't delete other avatar's avatarEntities | 504 | // don't delete other avatar's avatarEntities |
| 505 | // If you actually own the entity but the onwership is not set because of a domain switch | ||
| 506 | // the line below make sure the entity is deleted. | ||
| 505 | myAvatar->insertDetachedEntityID(id); | 507 | myAvatar->insertDetachedEntityID(id); |
| 506 | shouldDelete = false; | 508 | shouldDelete = false; |
| 507 | return; | 509 | return; |