diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 1c8e43f4ec95f1badda5513d788daae279a5ec1c..97a85045a20240aa90db1c44feeaf0828eb379e8 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -1430,25 +1430,6 @@ static void removeDuplicateItems(LLInventoryModel::item_array_t& items) const std::string LLAppearanceMgr::sExpectedTextureName = "OutfitPreview"; -// [SL:KB] - Patch: Appearance-WearableDuplicateAssets | Checked: 2015-06-30 (Catznip-3.7) -static void removeDuplicateWearableItemsByAssetID(LLInventoryModel::item_array_t& items) -{ - std::set<LLUUID> idsAsset; - items.erase(std::remove_if(items.begin(), items.end(), - [&idsAsset](const LLViewerInventoryItem* pItem) - { - if (pItem->isWearableType()) - { - const LLUUID& idAsset = pItem->getAssetUUID(); - if ( (idAsset.notNull()) && (idsAsset.end() != idsAsset.find(idAsset)) ) - return true; - idsAsset.insert(idAsset); - } - return false; - }), items.end()); -} -// [/SL:KB] - const LLUUID LLAppearanceMgr::getCOF() const { return gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT); @@ -2325,9 +2306,6 @@ void LLAppearanceMgr::updateCOF(LLInventoryModel::item_array_t& body_items_new, // [/RLVa:KB] // Reduce wearables to max of one per type. removeDuplicateItems(wear_items); -// [SL:KB] - Patch: Appearance-WearableDuplicateAssets | Checked: 2011-07-24 (Catznip-2.6.0e) | Added: Catznip-2.6.0e - removeDuplicateWearableItemsByAssetID(wear_items); -// [/SL:KB] filterWearableItems(wear_items, 0, LLAgentWearables::MAX_CLOTHING_LAYERS); // @@ -2833,10 +2811,6 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool enforce_item_restrictions, removeDuplicateItems(gest_items); filterWearableItems(wear_items, LLAgentWearables::MAX_CLOTHING_LAYERS, LLAgentWearables::MAX_CLOTHING_LAYERS); // [/SL:KB] -// [SL:KB] - Patch: Appearance-WearableDuplicateAssets | Checked: 2011-07-24 (Catznip-2.6.0e) | Added: Catznip-2.6.0e - // Wearing two wearables that share the same asset causes some issues - removeDuplicateWearableItemsByAssetID(wear_items); -// [/SL:KB] dumpItemArray(wear_items,"asset_dump: wear_item"); dumpItemArray(obj_items,"asset_dump: obj_item"); @@ -3363,13 +3337,6 @@ void LLAppearanceMgr::addCOFItemLink(const LLInventoryItem *item, // MULTI-WEARABLES: make sure we don't go over clothing limits remove_inventory_item(inv_item->getUUID(), cb); } -// [SL:KB] - Patch: Appearance-WearableDuplicateAssets | Checked: 2011-07-24 (Catznip-2.6.0e) | Added: Catznip-2.6.0e - else if ( (vitem->getWearableType() == wearable_type) && (vitem->getAssetUUID() == inv_item->getAssetUUID()) ) - { - // Only allow one wearable per unique asset - linked_already = true; - } -// [/SL:KB] } } diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 2977c8bbe0920ef8383d33aeae922136cb8c6f3f..889fca2044bb9da026b3a3d5c9eebe467aa853ee 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -7554,10 +7554,7 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags) if (LLWearableType::getInstance()->getAllowMultiwear(mWearableType)) { items.push_back(std::string("Wearable Add")); -// if (!gAgentWearables.canAddWearable(mWearableType)) -// [SL:KB] - Patch: Appearance-WearableDuplicateAssets | Checked: 2011-07-24 (Catznip-2.6.0e) | Added: Catznip-2.6.0e - if ( (!gAgentWearables.canAddWearable(mWearableType)) || (gAgentWearables.getWearableFromAssetID(item->getAssetUUID())) ) -// [/SL:KB] + if (!gAgentWearables.canAddWearable(mWearableType)) { disabled_items.push_back(std::string("Wearable Add")); }