diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2014-11-14 09:25:43 -0500 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2014-11-14 09:25:43 -0500 |
commit | 30c1d67d957ec7f895dd690ec34b5459fc9082de (patch) | |
tree | 04e19456f28d8fd5f893ceec1e4f935195c68cf9 /indra/newview/llappearancemgr.cpp | |
parent | c977268ff53ea362bc3b089945c9aa9a438cb63f (diff) |
MAINT-4537 WIP - order of operations during outfit change
Diffstat (limited to 'indra/newview/llappearancemgr.cpp')
-rwxr-xr-x | indra/newview/llappearancemgr.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index fba2b9d3a4..69efb20f79 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -807,6 +807,20 @@ void LLWearableHoldingPattern::onAllComplete() } } + LL_DEBUGS("Avatar") << self_av_string() << "Updating " << mObjItems.size() << " attachments" << LL_ENDL; + LLAgentWearables::llvo_vec_t objects_to_remove; + LLInventoryModel::item_array_t items_to_add; + if (isAgentAvatarValid()) + { + LLAgentWearables::findAttachmentsAddRemoveInfo(mObjItems, + objects_to_remove, + items_to_add); + + LL_DEBUGS("Avatar") << self_av_string() << "Removing " << objects_to_remove.size() + << " attachments" << LL_ENDL; + LLAgentWearables::userRemoveMultipleAttachments(objects_to_remove); + } + // Update wearables. LL_INFOS("Avatar") << self_av_string() << "HP " << index() << " updating agent wearables with " << mResolved << " wearable items " << LL_ENDL; LLAppearanceMgr::instance().updateAgentWearables(this); @@ -814,8 +828,8 @@ void LLWearableHoldingPattern::onAllComplete() // Update attachments to match those requested. if (isAgentAvatarValid()) { - LL_DEBUGS("Avatar") << self_av_string() << "Updating " << mObjItems.size() << " attachments" << LL_ENDL; - LLAgentWearables::userUpdateAttachments(mObjItems); + LL_DEBUGS("Avatar") << self_av_string() << "Adding " << items_to_add.size() << " attachments" << LL_ENDL; + LLAgentWearables::userAttachMultipleAttachments(items_to_add); } if (isFetchCompleted() && isMissingCompleted()) |