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 | 502 | AvatarSharedPointer myAvatar = avatarHashMap->getAvatarBySessionID(myNodeID); |
| 503 | 503 | if (entity->getClientOnly() && entity->getOwningAvatarID() != myNodeID) { |
| 504 | 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 | 507 | myAvatar->insertDetachedEntityID(id); |
| 506 | 508 | shouldDelete = false; |
| 507 | 509 | return; |