mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-19 14:03:20 +02:00
Merge pull request #10462 from zfox23/fixIdentityUpdatedAt
Force _identityUpdatedAt to stay above 0, fixing more identity packet bugs
This commit is contained in:
commit
64ae5119ae
1 changed files with 8 additions and 1 deletions
|
@ -1538,7 +1538,14 @@ 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"
|
||||
// this will overwrite any changes we made locally to this AvatarData's _identityUpdatedAt
|
||||
_identityUpdatedAt = identity.updatedAt - clockSkew;
|
||||
// Additionally, ensure that the timestamp that we try to record isn't negative, as
|
||||
// "_identityUpdatedAt" is an *unsigned* 64-bit integer. Furthermore, negative timestamps
|
||||
// wouldn't make sense.
|
||||
if (identity.updatedAt > clockSkew) {
|
||||
_identityUpdatedAt = identity.updatedAt - clockSkew;
|
||||
} else {
|
||||
_identityUpdatedAt = 0;
|
||||
}
|
||||
}
|
||||
|
||||
QByteArray AvatarData::identityByteArray() const {
|
||||
|
|
Loading…
Reference in a new issue