Fixed incorrect removal of ALL avatar fade events. Fade out should now work again when avatar leaves domain

This commit is contained in:
Olivier Prat 2017-07-18 14:46:49 +02:00
parent 2bba6aa816
commit 9130c51319
2 changed files with 2 additions and 2 deletions

View file

@ -319,9 +319,9 @@ void AvatarManager::handleRemovedAvatar(const AvatarSharedPointer& removedAvatar
// remove from node sets, if present
DependencyManager::get<NodeList>()->removeFromIgnoreMuteSets(avatar->getSessionUUID());
DependencyManager::get<UsersScriptingInterface>()->avatarDisconnected(avatar->getSessionUUID());
avatar->fadeOut(qApp->getMain3DScene(), removalReason);
}
_avatarsToFade.push_back(removedAvatar);
avatar->fadeOut(qApp->getMain3DScene(), removalReason);
}
void AvatarManager::clearOtherAvatars() {

View file

@ -173,7 +173,7 @@ void AvatarHashMap::processKillAvatar(QSharedPointer<ReceivedMessage> message, S
void AvatarHashMap::removeAvatar(const QUuid& sessionUUID, KillAvatarReason removalReason) {
QWriteLocker locker(&_hashLock);
AvatarSharedPointer removedAvatar = _avatarHash.take(sessionUUID);
auto removedAvatar = _avatarHash.take(sessionUUID);
if (removedAvatar) {
handleRemovedAvatar(removedAvatar, removalReason);