mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 19:21:16 +02:00
made requested changes
This commit is contained in:
parent
21d760a533
commit
d504000604
1 changed files with 4 additions and 4 deletions
|
@ -498,12 +498,12 @@ void EntityScriptingInterface::deleteEntity(QUuid id) {
|
||||||
|
|
||||||
auto nodeList = DependencyManager::get<NodeList>();
|
auto nodeList = DependencyManager::get<NodeList>();
|
||||||
const QUuid myNodeID = nodeList->getSessionUUID();
|
const QUuid myNodeID = nodeList->getSessionUUID();
|
||||||
auto avatarHashMap = DependencyManager::get<AvatarHashMap>();
|
|
||||||
AvatarSharedPointer myAvatar = avatarHashMap->getAvatarBySessionID(myNodeID);
|
|
||||||
if (entity->getClientOnly() && entity->getOwningAvatarID() != myNodeID) {
|
if (entity->getClientOnly() && entity->getOwningAvatarID() != myNodeID) {
|
||||||
// don't delete other avatar's avatarEntities
|
// don't delete other avatar's avatarEntities
|
||||||
// If you actually own the entity but the onwership is not set because of a domain switch
|
// If you actually own the entity but the onwership property is not set because of a domain switch
|
||||||
// the line below make sure the entity is deleted.
|
// 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);
|
myAvatar->insertDetachedEntityID(id);
|
||||||
shouldDelete = false;
|
shouldDelete = false;
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue