summaryrefslogtreecommitdiff
path: root/indra/newview/llattachmentsmgr.cpp
diff options
context:
space:
mode:
authorgwigz <gwigz@users.noreply.github.com>2024-10-07 19:11:37 +0100
committergwigz <gwigz@users.noreply.github.com>2024-10-07 19:11:37 +0100
commit9a002d32550f4fa5754802e54e323f13404f0377 (patch)
tree91e7c40e59c76119bf897b779c3ace3494cb1712 /indra/newview/llattachmentsmgr.cpp
parent93f5747aaacb4109eece1165dd76a5a5f01e0e77 (diff)
Port Firestorm/Catznip refresh attachments feature
Diffstat (limited to 'indra/newview/llattachmentsmgr.cpp')
-rw-r--r--indra/newview/llattachmentsmgr.cpp25
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]