From e259aa55c2d310c1423af5f9d313c4647db36cfc Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Mon, 15 Jul 2019 14:14:24 -0700 Subject: [PATCH] Remove loading-orb upon killing avatar, in case destructor isn't called --- interface/src/avatar/AvatarManager.cpp | 1 + interface/src/avatar/OtherAvatar.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/interface/src/avatar/AvatarManager.cpp b/interface/src/avatar/AvatarManager.cpp index c88a934acf..553033f394 100755 --- a/interface/src/avatar/AvatarManager.cpp +++ b/interface/src/avatar/AvatarManager.cpp @@ -574,6 +574,7 @@ void AvatarManager::handleRemovedAvatar(const AvatarSharedPointer& removedAvatar avatar->die(); queuePhysicsChange(avatar); + avatar->removeOrb(); // remove this avatar's entities from the tree now, if we wait (as we did previously) for this Avatar's destructor // it might not fire until after we create a new instance for the same remote avatar, which creates a race diff --git a/interface/src/avatar/OtherAvatar.cpp b/interface/src/avatar/OtherAvatar.cpp index 3776d54d9a..8c8c42679b 100755 --- a/interface/src/avatar/OtherAvatar.cpp +++ b/interface/src/avatar/OtherAvatar.cpp @@ -75,6 +75,7 @@ void OtherAvatar::createOrb() { properties.setType(EntityTypes::Sphere); properties.setAlpha(1.0f); properties.setColor(getLoadingOrbColor(_loadingStatus)); + properties.setName("Loading Avatar " + getID().toString()); properties.setPrimitiveMode(PrimitiveMode::LINES); properties.getPulse().setMin(0.5f); properties.getPulse().setMax(1.0f);