summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorNyx (Neal Orman) <nyx@lindenlab.com>2010-04-01 11:24:23 -0400
committerNyx (Neal Orman) <nyx@lindenlab.com>2010-04-01 11:24:23 -0400
commit7cce085480e5b637e30e008c2724f78f269a07c1 (patch)
tree6bfebaa946aff8d9cbca0bf5fcc9826ae10ae85e /indra/newview
parent045fb061376b25597b69d8043429d0fa25790c90 (diff)
parent6eeb4247bbdbb8c7682fabf871dd0345a340593c (diff)
Automated merge with ssh://hg.lindenlab.com/q/viewer-trunk
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llagentwearables.cpp19
-rw-r--r--indra/newview/llagentwearables.h4
2 files changed, 15 insertions, 8 deletions
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index 2bc6d28daa..0542e73bfd 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -1524,7 +1524,6 @@ void LLAgentWearables::removeWearableFinal(const EWearableType type, bool do_rem
}
// Assumes existing wearables are not dirty.
-// MULTI_WEARABLE: assumes one wearable per type.
void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& items,
const LLDynamicArray< LLWearable* >& wearables,
BOOL remove)
@@ -1782,16 +1781,24 @@ void LLAgentWearables::queryWearableCache()
gAgentQueryManager.mWearablesCacheQueryID++;
}
-// MULTI_WEARABLE: need a way to specify by wearable rather than by type.
// User has picked "remove from avatar" from a menu.
// static
-void LLAgentWearables::userRemoveWearable(EWearableType& type)
+void LLAgentWearables::userRemoveWearable(const EWearableType &type, const U32 &index)
{
- if (!(type==WT_SHAPE || type==WT_SKIN || type==WT_HAIR)) //&&
+ if (!(type==WT_SHAPE || type==WT_SKIN || type==WT_HAIR || type==WT_EYES)) //&&
//!((!gAgent.isTeen()) && (type==WT_UNDERPANTS || type==WT_UNDERSHIRT)))
{
- // MULTI_WEARABLE: fixed to 0th for now.
- gAgentWearables.removeWearable(type,false,0);
+ gAgentWearables.removeWearable(type,false,index);
+ }
+}
+
+//static
+void LLAgentWearables::userRemoveWearablesOfType(const EWearableType &type)
+{
+ if (!(type==WT_SHAPE || type==WT_SKIN || type==WT_HAIR || type==WT_EYES)) //&&
+ //!((!gAgent.isTeen()) && (type==WT_UNDERPANTS || type==WT_UNDERSHIRT)))
+ {
+ gAgentWearables.removeWearable(type,true,0);
}
}
diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h
index 652ffd4587..9f8aadeae7 100644
--- a/indra/newview/llagentwearables.h
+++ b/indra/newview/llagentwearables.h
@@ -193,8 +193,8 @@ public:
// Static UI hooks
//--------------------------------------------------------------------
public:
- // MULTI-WEARABLE: assuming one wearable per type. Need upstream changes.
- static void userRemoveWearable(EWearableType& type);
+ static void userRemoveWearable(const EWearableType &type, const U32 &index);
+ static void userRemoveWearablesOfType(const EWearableType &type);
static void userRemoveAllClothes();
typedef std::vector<LLViewerObject*> llvo_vec_t;