mirror of
https://github.com/lubosz/overte.git
synced 2025-08-08 04:08:13 +02:00
avoid backwards seek for skipped trait deletes
This commit is contained in:
parent
88f76ac760
commit
82170a66ed
1 changed files with 2 additions and 2 deletions
|
@ -337,7 +337,7 @@ void AvatarHashMap::processBulkAvatarTraits(QSharedPointer<ReceivedMessage> mess
|
||||||
// grab the last trait versions for this avatar
|
// grab the last trait versions for this avatar
|
||||||
auto& lastProcessedVersions = _processedTraitVersions[avatarID];
|
auto& lastProcessedVersions = _processedTraitVersions[avatarID];
|
||||||
|
|
||||||
while (traitType != AvatarTraits::NullTrait) {
|
while (traitType != AvatarTraits::NullTrait && message->getBytesLeftToRead() > 0) {
|
||||||
AvatarTraits::TraitVersion packetTraitVersion;
|
AvatarTraits::TraitVersion packetTraitVersion;
|
||||||
message->readPrimitive(&packetTraitVersion);
|
message->readPrimitive(&packetTraitVersion);
|
||||||
|
|
||||||
|
@ -378,7 +378,7 @@ void AvatarHashMap::processBulkAvatarTraits(QSharedPointer<ReceivedMessage> mess
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (skipBinaryTrait) {
|
if (skipBinaryTrait && traitBinarySize > 0) {
|
||||||
// we didn't read this trait because it was older or because we didn't have an avatar to process it for
|
// we didn't read this trait because it was older or because we didn't have an avatar to process it for
|
||||||
message->seek(message->getPosition() + traitBinarySize);
|
message->seek(message->getPosition() + traitBinarySize);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue