mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 13:18:26 +02:00
Finally, the actual fix?
This commit is contained in:
parent
d7e4f02291
commit
ae983658be
2 changed files with 4 additions and 4 deletions
|
@ -402,7 +402,7 @@ void AvatarMixer::handleAvatarIdentityPacket(QSharedPointer<ReceivedMessage> mes
|
||||||
AvatarData::parseAvatarIdentityPacket(message->getMessage(), identity);
|
AvatarData::parseAvatarIdentityPacket(message->getMessage(), identity);
|
||||||
bool identityChanged = false;
|
bool identityChanged = false;
|
||||||
bool displayNameChanged = false;
|
bool displayNameChanged = false;
|
||||||
avatar.processAvatarIdentity(identity, identityChanged, displayNameChanged, 0);
|
avatar.processAvatarIdentity(identity, identityChanged, displayNameChanged, senderNode->getClockSkewUsec());
|
||||||
if (identityChanged) {
|
if (identityChanged) {
|
||||||
QMutexLocker nodeDataLocker(&nodeData->getMutex());
|
QMutexLocker nodeDataLocker(&nodeData->getMutex());
|
||||||
nodeData->flagIdentityChange();
|
nodeData->flagIdentityChange();
|
||||||
|
|
|
@ -1497,9 +1497,9 @@ QUrl AvatarData::cannonicalSkeletonModelURL(const QUrl& emptyURL) const {
|
||||||
|
|
||||||
void AvatarData::processAvatarIdentity(const Identity& identity, bool& identityChanged, bool& displayNameChanged, const qint64 clockSkew) {
|
void AvatarData::processAvatarIdentity(const Identity& identity, bool& identityChanged, bool& displayNameChanged, const qint64 clockSkew) {
|
||||||
|
|
||||||
if (identity.updatedAt < _identityUpdatedAt + clockSkew) {
|
if ((_identityUpdatedAt > identity.updatedAt - clockSkew) && (_identityUpdatedAt != 0)) {
|
||||||
qCDebug(avatars) << "Ignoring late identity packet for avatar " << getSessionUUID()
|
qCDebug(avatars) << "Ignoring late identity packet for avatar " << getSessionUUID()
|
||||||
<< "identity.updatedAt:" << identity.updatedAt << "_identityUpdatedAt:" << _identityUpdatedAt << "clockSkew:" << clockSkew;
|
<< "_identityUpdatedAt (" << _identityUpdatedAt << ") is greater than identity.updatedAt - clockSkew (" << identity.updatedAt << "-" << clockSkew << ")";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1535,7 +1535,7 @@ void AvatarData::processAvatarIdentity(const Identity& identity, bool& identityC
|
||||||
|
|
||||||
// use the timestamp from this identity, since we want to honor the updated times in "server clock"
|
// use the timestamp from this identity, since we want to honor the updated times in "server clock"
|
||||||
// this will overwrite any changes we made locally to this AvatarData's _identityUpdatedAt
|
// this will overwrite any changes we made locally to this AvatarData's _identityUpdatedAt
|
||||||
_identityUpdatedAt = identity.updatedAt;
|
_identityUpdatedAt = identity.updatedAt - clockSkew;
|
||||||
}
|
}
|
||||||
|
|
||||||
QByteArray AvatarData::identityByteArray() const {
|
QByteArray AvatarData::identityByteArray() const {
|
||||||
|
|
Loading…
Reference in a new issue