diff options
author | Erik Kundiman <erik@megapahit.org> | 2024-10-08 10:59:33 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-08 10:59:33 +0800 |
commit | a854c4413e07e42ee0db1b0567503372a752e2df (patch) | |
tree | 91e7c40e59c76119bf897b779c3ace3494cb1712 /indra/newview/llattachmentsmgr.cpp | |
parent | 93f5747aaacb4109eece1165dd76a5a5f01e0e77 (diff) | |
parent | 9a002d32550f4fa5754802e54e323f13404f0377 (diff) |
Merge pull request #14 from gwigz/refresh-attachments
Port Firestorm/Catznip refresh attachments feature
Diffstat (limited to 'indra/newview/llattachmentsmgr.cpp')
-rw-r--r-- | indra/newview/llattachmentsmgr.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/indra/newview/llattachmentsmgr.cpp b/indra/newview/llattachmentsmgr.cpp index deabcd9f42..0c87b60e7f 100644 --- a/indra/newview/llattachmentsmgr.cpp +++ b/indra/newview/llattachmentsmgr.cpp @@ -545,3 +545,28 @@ void LLAttachmentsMgr::spamStatusInfo() } #endif } + +// [SL:KB] - Patch: Appearance-PhantomAttach | Checked: Catznip-5.0 +void LLAttachmentsMgr::refreshAttachments() +{ + if (!isAgentAvatarValid()) + return; + + for (const auto& kvpAttachPt : gAgentAvatarp->mAttachmentPoints) + { + for (const LLViewerObject* pAttachObj : kvpAttachPt.second->mAttachedObjects) + { + const LLUUID& idItem = pAttachObj->getAttachmentItemID(); + if ( (mAttachmentRequests.wasRequestedRecently(idItem)) || (pAttachObj->isTempAttachment()) ) + continue; + + AttachmentsInfo attachment; + attachment.mItemID = idItem; + attachment.mAttachmentPt = kvpAttachPt.first; + attachment.mAdd = true; + mPendingAttachments.push_back(attachment); + mAttachmentRequests.addTime(idItem); + } + } +} +// [/SL:KB] |