mirror of
https://github.com/lubosz/overte.git
synced 2025-04-27 20:35:29 +02:00
fix logic for initial send of deleted trait instance
This commit is contained in:
parent
3e2d4dc696
commit
25ed166f07
1 changed files with 5 additions and 3 deletions
|
@ -83,10 +83,12 @@ void ClientTraitsHandler::sendChangedTraitsToMixer() {
|
|||
auto instancedIt = traitStatusesCopy.instancedCBegin();
|
||||
while (instancedIt != traitStatusesCopy.instancedCEnd()) {
|
||||
for (auto& instanceIDValuePair : instancedIt->instances) {
|
||||
if (_shouldPerformInitialSend || instanceIDValuePair.value == Updated) {
|
||||
// this is a changed trait we need to send, ask the owning avatar to pack it
|
||||
if ((_shouldPerformInitialSend && instanceIDValuePair.value != Deleted)
|
||||
|| instanceIDValuePair.value == Updated) {
|
||||
// this is a changed trait we need to send or we haven't send out trait information yet
|
||||
// ask the owning avatar to pack it
|
||||
_owningAvatar->packTraitInstance(instancedIt->traitType, instanceIDValuePair.id, *traitsPacketList);
|
||||
} else if (instanceIDValuePair.value == Deleted) {
|
||||
} else if (!_shouldPerformInitialSend && instanceIDValuePair.value == Deleted) {
|
||||
// pack delete for this trait instance
|
||||
AvatarTraits::packInstancedTraitDelete(instancedIt->traitType, instanceIDValuePair.id,
|
||||
*traitsPacketList);
|
||||
|
|
Loading…
Reference in a new issue