diff options
author | prep <prep@lindenlab.com> | 2013-04-08 17:11:24 -0400 |
---|---|---|
committer | prep <prep@lindenlab.com> | 2013-04-08 17:11:24 -0400 |
commit | a2a25c9ed5de12cfb8a08844682368dc236a1b42 (patch) | |
tree | ab3f3eb48cac5fedb091a9fe46cc0eefd64315ce /indra/newview/llagentwearables.cpp | |
parent | 985b7277e824c39275d9a06c6262b6f394b02133 (diff) | |
parent | b4c60f430332674e5dbdb672152e62d252e9a6e1 (diff) |
merge
Diffstat (limited to 'indra/newview/llagentwearables.cpp')
-rw-r--r-- | indra/newview/llagentwearables.cpp | 52 |
1 files changed, 10 insertions, 42 deletions
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 3cee7826fd..c88694ef76 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -1124,19 +1124,14 @@ void LLAgentWearables::addWearableToAgentInventory(LLPointer<LLInventoryCallback cb); } -void LLAgentWearables::removeWearable(const LLWearableType::EType type, bool do_remove_all, U32 index, BOOL will_replace) +void LLAgentWearables::removeWearable(const LLWearableType::EType type, bool do_remove_all, U32 index) { - if (gAgent.isTeen() && + if (gAgent.isTeen() && (type == LLWearableType::WT_UNDERSHIRT || type == LLWearableType::WT_UNDERPANTS)) { // Can't take off underclothing in simple UI mode or on PG accounts - - if (getWearableCount(type) < 2 && !will_replace) - { - // if there is 0 or 1 undergarment worn, and we're not going to be immediately adding another, - // we cannot allow the removal for teen accounts - return; - } + // TODO: enable the removing of a single undershirt/underpants if multiple are worn. - Nyx + return; } if (getWearableCount(type) == 0) { @@ -1244,31 +1239,6 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it { llinfos << "setWearableOutfit() start" << llendl; - S32 count = wearables.count(); - llassert(items.count() == count); - S32 i; - - bool has_undershirt = false; - bool has_underpants = false; - - for (i = 0; i < count; i++) - { - LLViewerWearable* new_wearable = wearables[i]; - if (new_wearable) - { - const LLWearableType::EType type = new_wearable->getType(); - if (type == LLWearableType::WT_UNDERSHIRT) - { - has_undershirt = true; - } - if (type == LLWearableType::WT_UNDERPANTS) - { - has_underpants = true; - } - } - } - - // TODO: Removed check for ensuring that teens don't remove undershirt and underwear. Handle later if (remove) { @@ -1278,17 +1248,15 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it { if (LLWearableType::getAssetType((LLWearableType::EType)type) == LLAssetType::AT_CLOTHING) { - bool will_replace = false; - if ((type == LLWearableType::WT_UNDERSHIRT && has_undershirt) || - (type == LLWearableType::WT_UNDERPANTS && has_underpants)) - { - will_replace = true; - } - removeWearable((LLWearableType::EType)type, true, 0, will_replace); + removeWearable((LLWearableType::EType)type, true, 0); } } } + S32 count = wearables.count(); + llassert(items.count() == count); + + S32 i; for (i = 0; i < count; i++) { LLViewerWearable* new_wearable = wearables[i]; @@ -1518,7 +1486,7 @@ void LLAgentWearables::queryWearableCache() gAgentAvatarp->outputRezTiming("Fetching textures from cache"); } - LL_INFOS("Avatar") << gAgentAvatarp->avString() << "Requesting texture cache entry for " << num_queries << " baked textures" << LL_ENDL; + LL_DEBUGS("Avatar") << gAgentAvatarp->avString() << "Requesting texture cache entry for " << num_queries << " baked textures" << LL_ENDL; gMessageSystem->sendReliable(gAgent.getRegion()->getHost()); gAgentQueryManager.mNumPendingQueries++; gAgentQueryManager.mWearablesCacheQueryID++; |