mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 17:10:45 +02:00
don't send override avatar URL if override matches
This commit is contained in:
parent
a56e9b0860
commit
f9230eca7f
1 changed files with 13 additions and 10 deletions
|
@ -178,11 +178,13 @@ void AvatarMixerClientData::checkSkeletonURLAgainstWhitelist(SlaveSharedData *sl
|
|||
}
|
||||
|
||||
if (!inWhitelist) {
|
||||
// make sure we're not unecessarily overriding the default avatar with the default avatar
|
||||
if (_avatar->getWireSafeSkeletonModelURL() != slaveSharedData->skeletonReplacementURL) {
|
||||
// we need to change this avatar's skeleton URL, and send them a traits packet informing them of the change
|
||||
qDebug() << "Overwriting avatar URL" << _avatar->getWireSafeSkeletonModelURL()
|
||||
<< "to replacement" << slaveSharedData->skeletonReplacementURL << "for" << sendingNode.getUUID();
|
||||
_avatar->setSkeletonModelURL(slaveSharedData->skeletonReplacementURL);
|
||||
|
||||
qDebug() << "Sending overwritten" << _avatar->getSkeletonModelURL() << "back to sending avatar";
|
||||
|
||||
auto packet = NLPacket::create(PacketType::SetAvatarTraits, -1, true);
|
||||
|
||||
// the returned set traits packet uses the trait version from the incoming packet
|
||||
|
@ -194,6 +196,7 @@ void AvatarMixerClientData::checkSkeletonURLAgainstWhitelist(SlaveSharedData *sl
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uint64_t AvatarMixerClientData::getLastBroadcastTime(const QUuid& nodeUUID) const {
|
||||
// return the matching PacketSequenceNumber, or the default if we don't have it
|
||||
|
|
Loading…
Reference in a new issue