mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 19:10:49 +02:00
Code review
This commit is contained in:
parent
da5f462e4f
commit
240c58c6ce
1 changed files with 3 additions and 4 deletions
|
@ -271,10 +271,9 @@ void AvatarMixerClientData::processSetTraitsMessage(ReceivedMessage& message,
|
||||||
} else {
|
} else {
|
||||||
// Don't accept avatar entity data for distribution unless sender has rez permissions on the domain.
|
// Don't accept avatar entity data for distribution unless sender has rez permissions on the domain.
|
||||||
// The sender shouldn't be sending avatar entity data, however this provides a back-up.
|
// The sender shouldn't be sending avatar entity data, however this provides a back-up.
|
||||||
|
auto trait = message.read(traitSize);
|
||||||
if (sendingNode.getCanRezAvatarEntities()) {
|
if (sendingNode.getCanRezAvatarEntities()) {
|
||||||
_avatar->processTraitInstance(traitType, instanceID, message.read(traitSize));
|
_avatar->processTraitInstance(traitType, instanceID, trait);
|
||||||
} else {
|
|
||||||
message.read(traitSize);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
instanceVersionRef = packetTraitVersion;
|
instanceVersionRef = packetTraitVersion;
|
||||||
|
@ -301,8 +300,8 @@ void AvatarMixerClientData::emulateDeleteEntitiesTraitsMessage(const QList<QUuid
|
||||||
// Emulates processSetTraitsMessage() actions on behalf of an avatar whose canRezAvatarEntities permission has been removed.
|
// Emulates processSetTraitsMessage() actions on behalf of an avatar whose canRezAvatarEntities permission has been removed.
|
||||||
// The source avatar should be removing its avatar entities. However, this provides a back-up.
|
// The source avatar should be removing its avatar entities. However, this provides a back-up.
|
||||||
|
|
||||||
|
auto traitType = AvatarTraits::AvatarEntity;
|
||||||
for (const auto& entityID : avatarEntityIDs) {
|
for (const auto& entityID : avatarEntityIDs) {
|
||||||
auto traitType = AvatarTraits::AvatarEntity;
|
|
||||||
auto& instanceVersionRef = _lastReceivedTraitVersions.getInstanceValueRef(traitType, entityID);
|
auto& instanceVersionRef = _lastReceivedTraitVersions.getInstanceValueRef(traitType, entityID);
|
||||||
|
|
||||||
_avatar->processDeletedTraitInstance(traitType, entityID);
|
_avatar->processDeletedTraitInstance(traitType, entityID);
|
||||||
|
|
Loading…
Reference in a new issue