mirror of
https://github.com/lubosz/overte.git
synced 2025-04-27 06:55:40 +02:00
always check added avatar entities once in updateAvatarEntities
This commit is contained in:
parent
25876bca63
commit
99f532a20e
3 changed files with 4 additions and 6 deletions
libraries
|
@ -2692,7 +2692,7 @@ void AvatarData::setAttachmentsVariant(const QVariantList& variant) {
|
|||
|
||||
const int MAX_NUM_AVATAR_ENTITIES = 42;
|
||||
|
||||
void AvatarData::updateAvatarEntity(const QUuid& entityID, const QByteArray& entityData, bool requiresTreeUpdate) {
|
||||
void AvatarData::updateAvatarEntity(const QUuid& entityID, const QByteArray& entityData) {
|
||||
_avatarEntitiesLock.withWriteLock([&] {
|
||||
AvatarEntityMap::iterator itr = _avatarEntityData.find(entityID);
|
||||
if (itr == _avatarEntityData.end()) {
|
||||
|
@ -2704,9 +2704,7 @@ void AvatarData::updateAvatarEntity(const QUuid& entityID, const QByteArray& ent
|
|||
}
|
||||
});
|
||||
|
||||
if (requiresTreeUpdate) {
|
||||
_avatarEntityDataChanged = true;
|
||||
}
|
||||
_avatarEntityDataChanged = true;
|
||||
|
||||
if (_clientTraitsHandler) {
|
||||
// we have a client traits handler, so we need to mark this instanced trait as changed
|
||||
|
|
|
@ -925,7 +925,7 @@ public:
|
|||
* @param {Uuid} entityID
|
||||
* @param {string} entityData
|
||||
*/
|
||||
Q_INVOKABLE void updateAvatarEntity(const QUuid& entityID, const QByteArray& entityData, bool requiresTreeUpdate = true);
|
||||
Q_INVOKABLE void updateAvatarEntity(const QUuid& entityID, const QByteArray& entityData);
|
||||
|
||||
/**jsdoc
|
||||
* @function MyAvatar.clearAvatarEntity
|
||||
|
|
|
@ -74,7 +74,7 @@ void EntityEditPacketSender::queueEditAvatarEntityMessage(PacketType type,
|
|||
jsonProperties = QJsonDocument(jsonObject);
|
||||
|
||||
QByteArray binaryProperties = jsonProperties.toBinaryData();
|
||||
_myAvatar->updateAvatarEntity(entityItemID, binaryProperties, false);
|
||||
_myAvatar->updateAvatarEntity(entityItemID, binaryProperties);
|
||||
|
||||
entity->setLastBroadcast(usecTimestampNow());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue