mirror of
https://github.com/overte-org/overte.git
synced 2025-08-11 06:53:00 +02:00
Add some comments as per CR request
This commit is contained in:
parent
d54fec4476
commit
0297d337d5
1 changed files with 16 additions and 2 deletions
|
@ -194,12 +194,26 @@ private:
|
||||||
|
|
||||||
AvatarTraits::TraitMessageSequence _currentTraitsMessageSequence{ 0 };
|
AvatarTraits::TraitMessageSequence _currentTraitsMessageSequence{ 0 };
|
||||||
|
|
||||||
|
// Cache of trait versions sent in a given packet (indexed by sequence number)
|
||||||
|
// When an ack is received, the sequence number in the ack is used to look up
|
||||||
|
// the sent trait versions and they are copied to _perNodeAckedTraitVersions.
|
||||||
|
// We remember the data in _perNodePendingTraitVersions instead of requiring
|
||||||
|
// the client to return all of the versions for each trait it received in a given packet,
|
||||||
|
// reducing the size of the ack packet.
|
||||||
std::unordered_map<AvatarTraits::TraitMessageSequence, PerNodeTraitVersions> _perNodePendingTraitVersions;
|
std::unordered_map<AvatarTraits::TraitMessageSequence, PerNodeTraitVersions> _perNodePendingTraitVersions;
|
||||||
|
|
||||||
std::unordered_map<Node::LocalID, TraitsCheckTimestamp> _lastSentTraitsTimestamps;
|
// Versions of traits that have been acked, which will be compared to incoming
|
||||||
PerNodeTraitVersions _perNodeSentTraitVersions;
|
// trait updates. Incoming updates going to a given node will be ignored if
|
||||||
|
// the ack for the previous packet (containing those versions) has not been
|
||||||
|
// received.
|
||||||
PerNodeTraitVersions _perNodeAckedTraitVersions;
|
PerNodeTraitVersions _perNodeAckedTraitVersions;
|
||||||
|
|
||||||
|
std::unordered_map<Node::LocalID, TraitsCheckTimestamp> _lastSentTraitsTimestamps;
|
||||||
|
|
||||||
|
// cache of traits sent to a node which are compared to incoming traits to
|
||||||
|
// prevent sending traits that have already been sent.
|
||||||
|
PerNodeTraitVersions _perNodeSentTraitVersions;
|
||||||
|
|
||||||
std::atomic_bool _isIgnoreRadiusEnabled { false };
|
std::atomic_bool _isIgnoreRadiusEnabled { false };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue