summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
authorVir Linden <60274682+vir-linden@users.noreply.github.com>2024-01-17 11:12:23 -0500
committerGitHub <noreply@github.com>2024-01-17 11:12:23 -0500
commitf584d14f7f0d129f2d7e430cf843835bbe23d6f9 (patch)
treee0559f1ae1a94e8e8ce5efa53b58b6eaddb3f1d7 /indra/newview/llvoavatar.cpp
parent469f2621f170484943093a830ec385f1b8d20934 (diff)
parenta9ef4d2ee8470e944b09402d0f796cb09cdb728d (diff)
Merge pull request #565 from secondlife/simon/sl-20635-new-data
SL-20635 - new data to ObjectUpdate and AvatarAppearance message
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r--indra/newview/llvoavatar.cpp21
1 files changed, 19 insertions, 2 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 8ab7cda28c..c95648d62e 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -9269,7 +9269,7 @@ void LLVOAvatar::parseAppearanceMessage(LLMessageSystem* mesgsys, LLAppearanceMe
//mesgsys->getU32Fast(_PREHASH_AppearanceData, _PREHASH_Flags, appearance_flags, 0);
}
- // Parse the AppearanceData field, if any.
+ // Parse the AppearanceHover field, if any.
contents.mHoverOffsetWasSet = false;
if (mesgsys->has(_PREHASH_AppearanceHover))
{
@@ -9279,7 +9279,24 @@ void LLVOAvatar::parseAppearanceMessage(LLMessageSystem* mesgsys, LLAppearanceMe
contents.mHoverOffset = hover;
contents.mHoverOffsetWasSet = true;
}
-
+
+ // Get attachment info, if sent
+ LLUUID attachment_id;
+ U8 attach_point;
+ S32 attach_count = mesgsys->getNumberOfBlocksFast(_PREHASH_AttachmentBlock);
+ LL_DEBUGS("AVAppearanceAttachments") << "Agent " << getID() << " has "
+ << attach_count << " attachments" << LL_ENDL;
+
+ for (S32 attach_i = 0; attach_i < attach_count; attach_i++)
+ {
+ mesgsys->getUUIDFast(_PREHASH_AttachmentBlock, _PREHASH_ID, attachment_id, attach_i);
+ mesgsys->getU8Fast(_PREHASH_AttachmentBlock, _PREHASH_AttachmentPoint, attach_point, attach_i);
+ LL_DEBUGS("AVAppearanceAttachments") << "AV " << getID() << " has attachment " << attach_i << " "
+ << (attachment_id.isNull() ? "pending" : attachment_id.asString())
+ << " on point " << (S32)attach_point << LL_ENDL;
+ // To do - store and use this information as needed
+ }
+
// Parse visual params, if any.
S32 num_blocks = mesgsys->getNumberOfBlocksFast(_PREHASH_VisualParam);
static LLCachedControl<bool> block_some_avatars(gSavedSettings, "BlockSomeAvatarAppearanceVisualParams");