diff options
author | Nyx Linden <nyx@lindenlab.com> | 2010-05-19 19:48:23 -0400 |
---|---|---|
committer | Nyx Linden <nyx@lindenlab.com> | 2010-05-19 19:48:23 -0400 |
commit | 8487341b0f255e65044c3f7e3dc09461b4e2351e (patch) | |
tree | 52fa9c0591157c8e4055cb405331afa2deb9dcb2 /indra/newview/llappearancemgr.cpp | |
parent | 46fc55fca546ee8ac0db8cf69b136bc3e344eed1 (diff) |
AVP-44 WIP Back-end support for multiwearables
Changed a lot of areas of code that were not dealing with multiwearables properly.
Little functionality changed, as the support mechanisms that were out of date were
subtle, but getting closer to no further areas of code that don't properly support
multi-wearables.
Code reviewed by Vir.
Diffstat (limited to 'indra/newview/llappearancemgr.cpp')
-rw-r--r-- | indra/newview/llappearancemgr.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 4aef72ab0b..7d39ba30f0 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -1469,14 +1469,21 @@ void LLAppearanceMgr::addCOFItemLink(const LLInventoryItem *item, bool do_update { // Are these links to the same object? const LLViewerInventoryItem* inv_item = item_array.get(i).get(); + const LLWearableType::EType wearable_type = inv_item->getWearableType(); + + const bool is_body_part = (wearable_type == LLWearableType::WT_SHAPE) + || (wearable_type == LLWearableType::WT_HAIR) + || (wearable_type == LLWearableType::WT_EYES) + || (wearable_type == LLWearableType::WT_SKIN); + if (inv_item->getLinkedUUID() == vitem->getLinkedUUID()) { linked_already = true; } - // Are these links to different items of the same wearable + // Are these links to different items of the same body part // type? If so, new item will replace old. - // MULTI-WEARABLES: revisit if more than one per type is allowed. - else if (FALSE/*areMatchingWearables(vitem,inv_item)*/) + // TODO: MULTI-WEARABLE: check for wearable limit for clothing types + else if (is_body_part) { if (inv_item->getIsLinkType()) { |