mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 16:41:02 +02:00
Merge pull request #9248 from howard-stearns/fixIdentityPacketInAC
Fix idententity packet in AC
This commit is contained in:
commit
51c0ab0aed
1 changed files with 10 additions and 5 deletions
|
@ -134,11 +134,16 @@ void AvatarHashMap::processAvatarIdentityPacket(QSharedPointer<ReceivedMessage>
|
||||||
// make sure this isn't for an ignored avatar
|
// make sure this isn't for an ignored avatar
|
||||||
auto nodeList = DependencyManager::get<NodeList>();
|
auto nodeList = DependencyManager::get<NodeList>();
|
||||||
static auto EMPTY = QUuid();
|
static auto EMPTY = QUuid();
|
||||||
if (identity.uuid == _avatarHash.value(EMPTY)->getSessionUUID()) {
|
|
||||||
// We add MyAvatar to _avatarHash with an empty UUID. Code relies on this. In order to correctly handle an
|
{
|
||||||
// identity packet for ourself (such as when we are assigned a sessionDisplayName by the mixer upon joining),
|
QReadLocker locker(&_hashLock);
|
||||||
// we make things match here.
|
auto me = _avatarHash.find(EMPTY);
|
||||||
identity.uuid = EMPTY;
|
if ((me != _avatarHash.end()) && (identity.uuid == me.value()->getSessionUUID())) {
|
||||||
|
// We add MyAvatar to _avatarHash with an empty UUID. Code relies on this. In order to correctly handle an
|
||||||
|
// identity packet for ourself (such as when we are assigned a sessionDisplayName by the mixer upon joining),
|
||||||
|
// we make things match here.
|
||||||
|
identity.uuid = EMPTY;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!nodeList->isIgnoringNode(identity.uuid)) {
|
if (!nodeList->isIgnoringNode(identity.uuid)) {
|
||||||
// mesh URL for a UUID, find avatar in our list
|
// mesh URL for a UUID, find avatar in our list
|
||||||
|
|
Loading…
Reference in a new issue