From 05c14aa5588596a3bef49cee45e648c1f5ef18b7 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Tue, 4 Jan 2011 13:52:29 +0200 Subject: STORM-702 FIXED Made it possible to wear partial outfits Enabled the "Replace Current Outfit" option for incomplete outfits (i.e. those that don't contain full set of body parts). --- indra/newview/llappearancemgr.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'indra/newview/llappearancemgr.cpp') diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 80734b0d41..f40fed5ad3 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -1300,8 +1300,16 @@ bool LLAppearanceMgr::getCanReplaceCOF(const LLUUID& outfit_cat_id) return false; } - // Check whether the outfit contains the full set of body parts (shape+skin+hair+eyes). - return getCanMakeFolderIntoOutfit(outfit_cat_id); + // Check whether the outfit contains any wearables we aren't wearing already (STORM-702). + LLInventoryModel::cat_array_t cats; + LLInventoryModel::item_array_t items; + LLFindWearablesEx is_worn(/*is_worn=*/ false, /*include_body_parts=*/ true); + gInventory.collectDescendentsIf(outfit_cat_id, + cats, + items, + LLInventoryModel::EXCLUDE_TRASH, + is_worn); + return items.size() > 0; } void LLAppearanceMgr::purgeBaseOutfitLink(const LLUUID& category) -- cgit v1.2.3