summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2009-11-04 15:28:07 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2009-11-04 15:28:07 -0500
commit98a24938b3cd95f7c93283b91dc95582925265f5 (patch)
tree64dbd6e42537f4e4bf928139bd122464f07516d9 /indra
parentfe7750152b69aa89731ca95ac59ef402b6df137d (diff)
LLAppearanceManager::wearItem() - always check for extra links of same type, even if requested object is already linked.
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llappearancemgr.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 382947e464..033df053ad 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -1103,14 +1103,16 @@ void LLAppearanceManager::wearItem( LLInventoryItem* item, bool do_update )
bool linked_already = false;
for (S32 i=0; i<item_array.count(); i++)
{
+ // Are these links to the same object?
const LLViewerInventoryItem* inv_item = item_array.get(i).get();
if (inv_item->getLinkedUUID() == item->getLinkedUUID())
{
linked_already = true;
- break;
}
- // Are of same type but are not the same - new item will replace old.
- if (areMatchingWearables(vitem,inv_item))
+ // Are these links to different items of the same wearable
+ // type? If so, new item will replace old.
+ // MULTI-WEARABLES: revisit if more than one per type is allowed.
+ else if (areMatchingWearables(vitem,inv_item))
{
gAgentWearables.removeWearable(inv_item->getWearableType(),true,0);
gInventory.purgeObject(inv_item->getUUID());