Merge pull request #15311 from danteruiz/double-avatars

Case 21415: Avatars stay behind after they disconnect
This commit is contained in:
Sam Gateau 2019-04-03 16:07:35 -07:00 committed by GitHub
commit 0d8169bd35
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -497,7 +497,7 @@ void AvatarManager::handleRemovedAvatar(const AvatarSharedPointer& removedAvatar
// it might not fire until after we create a new instance for the same remote avatar, which creates a race
// on the creation of entities for that avatar instance and the deletion of entities for this instance
avatar->removeAvatarEntitiesFromTree();
if (removalReason == KillAvatarReason::TheirAvatarEnteredYourBubble) {
if (removalReason == KillAvatarReason::TheirAvatarEnteredYourBubble || removalReason == KillAvatarReason::NoReason) {
emit AvatarInputs::getInstance()->avatarEnteredIgnoreRadius(avatar->getSessionUUID());
emit DependencyManager::get<UsersScriptingInterface>()->enteredIgnoreRadius();