diff options
author | Neal Orman <nyx@lindenlab.com> | 2009-10-22 18:29:52 +0000 |
---|---|---|
committer | Neal Orman <nyx@lindenlab.com> | 2009-10-22 18:29:52 +0000 |
commit | e5484e56b3c13e65bd31d7bf21c1cd3a2d9333f2 (patch) | |
tree | d534d2af3e092cc1a80c6bca70bbc40d3d4d71e1 /indra/newview/llagentwearables.cpp | |
parent | 8f890c85c3a60726c989e4149300564718e901c9 (diff) |
EXT-1784 Server getting spammed whenever you put on a wearable
Made an adjustment to ignore remove requests on items that don't exist, to avoid the extra messages to the server.
Also made a couple of adjustments to ensure removal of alpha masks and tattoos along with other wearable types.
Added these code points to the wiki page detailing what modifications need to be made when adding a new wearable type:
https://wiki.lindenlab.com/wiki/User:Vir#Adding_new_wearables
Code reviewed by Seraph.
Diffstat (limited to 'indra/newview/llagentwearables.cpp')
-rw-r--r-- | indra/newview/llagentwearables.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index bb00468d40..c1866c36a2 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -1310,6 +1310,11 @@ void LLAgentWearables::removeWearable(const EWearableType type, bool do_remove_a // TODO: enable the removing of a single undershirt/underpants if multiple are worn. - Nyx return; } + if (getWearableCount(type) == 0) + { + // no wearables to remove + return; + } if (do_remove_all) { @@ -1431,6 +1436,9 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it wearables_to_remove[WT_UNDERSHIRT] = (!gAgent.isTeen()) & remove; wearables_to_remove[WT_UNDERPANTS] = (!gAgent.isTeen()) & remove; wearables_to_remove[WT_SKIRT] = remove; + wearables_to_remove[WT_ALPHA] = remove; + wearables_to_remove[WT_TATTOO] = remove; + S32 count = wearables.count(); llassert(items.count() == count); @@ -1743,6 +1751,8 @@ void LLAgentWearables::userRemoveAllClothesStep2(BOOL proceed) gAgentWearables.removeWearable(WT_UNDERSHIRT,true,0); gAgentWearables.removeWearable(WT_UNDERPANTS,true,0); gAgentWearables.removeWearable(WT_SKIRT,true,0); + gAgentWearables.removeWearable(WT_ALPHA,true,0); + gAgentWearables.removeWearable(WT_TATTOO,true,0); } } |