summaryrefslogtreecommitdiff
path: root/indra/newview/llappearancemgr.cpp
diff options
context:
space:
mode:
authorKitty Barnett <develop@catznip.com>2024-08-29 20:51:00 +0200
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2026-03-15 21:55:33 +0200
commitb2a22e1a9bfe93d72503492f4d6096567e164937 (patch)
treebc04b82dbd156f48bab326e09502ca1c3aa87ff2 /indra/newview/llappearancemgr.cpp
parenta7512cfc9c7fdf7b3a24f09bc1b84878aa188ffb (diff)
Resolve issues tracking worn attachments that aren't in COF yet (see PR for more details)
Diffstat (limited to 'indra/newview/llappearancemgr.cpp')
-rw-r--r--indra/newview/llappearancemgr.cpp24
1 files changed, 23 insertions, 1 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index e71325e9cf..4bc9c55019 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -2574,6 +2574,23 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool enforce_item_restrictions,
// Update attachments to match those requested.
if (isAgentAvatarValid())
{
+ // Include attachments which should be in COF but don't have their link created yet
+ std::set<LLUUID> pendingAttachments;
+ LLAttachmentsMgr::instance().getPendingAttachments(pendingAttachments);
+ for (const LLUUID& idAttachItem : pendingAttachments)
+ {
+ if ( !gAgentAvatarp->isWearingAttachment(idAttachItem) || isLinkedInCOF(idAttachItem) )
+ {
+ LLAttachmentsMgr::instance().clearPendingAttachmentLink(idAttachItem);
+ continue;
+ }
+
+ if (LLViewerInventoryItem* pAttachItem = gInventory.getItem(idAttachItem))
+ {
+ obj_items.push_back(pAttachItem);
+ }
+ }
+
LL_DEBUGS("Avatar") << self_av_string() << "Updating " << obj_items.size() << " attachments" << LL_ENDL;
LLAgentWearables::llvo_vec_t objects_to_remove;
LLAgentWearables::llvo_vec_t objects_to_retain;
@@ -2600,7 +2617,11 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool enforce_item_restrictions,
}
// Take off the attachments that will no longer be in the outfit.
- LLAgentWearables::userRemoveMultipleAttachments(objects_to_remove);
+ // (don't remove attachments until avatar is fully loaded - reduces random attaching/detaching/reattaching at log-on)
+ if (gAgentAvatarp->isFullyLoaded())
+ {
+ LLAgentWearables::userRemoveMultipleAttachments(objects_to_remove);
+ }
// Restore attachment pos overrides for the attachments that
// are remaining in the outfit.
@@ -4173,6 +4194,7 @@ void LLAppearanceMgr::removeItemsFromAvatar(const uuid_vec_t& ids_to_remove, nul
continue;
}
removeCOFItemLinks(linked_item_id, cb);
+ LLAttachmentsMgr::instance().clearPendingAttachmentLink(linked_item_id);
addDoomedTempAttachment(linked_item_id);
}
}