From 15b91b9149a5cdcfd52c33f1dd41f4e0e757e270 Mon Sep 17 00:00:00 2001 From: Nyx Linden Date: Tue, 2 Apr 2013 12:46:41 -0400 Subject: SH-4044 FIX voice dot is offset vertically if using avatar height offset Added the height offset in one too many places. fixing. --- indra/newview/llvoavatar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 0ec6ef3d14..725939dd3e 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2144,7 +2144,7 @@ void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled) { LLVector3 tagPos = mRoot->getWorldPosition(); tagPos[VZ] -= mPelvisToFoot; - tagPos[VZ] += ( mBodySize[VZ] + mAvatarOffset[VZ] + 0.125f ); + tagPos[VZ] += ( mBodySize[VZ] + 0.125f ); mVoiceVisualizer->setVoiceSourceWorldPosition( tagPos ); } }//if ( voiceEnabled ) -- cgit v1.2.3 From 49731dd21dec5fb8b6e5781940bab5f5fa9600a2 Mon Sep 17 00:00:00 2001 From: Nyx Linden Date: Tue, 2 Apr 2013 12:51:45 -0400 Subject: SH-4051 FIX problem with teen account and undershirt layers Updated logic for teen accounts, to ensure that during any transition that they are wearing at least one undershirt wearable and one underpants wearable. --- indra/newview/llagentwearables.cpp | 50 +++++++++++++++++++++++++++++++------- indra/newview/llagentwearables.h | 2 +- 2 files changed, 42 insertions(+), 10 deletions(-) (limited to 'indra') diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index ba04991a02..3cee7826fd 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -1124,14 +1124,19 @@ void LLAgentWearables::addWearableToAgentInventory(LLPointergetType(); + 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) { @@ -1248,15 +1278,17 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it { if (LLWearableType::getAssetType((LLWearableType::EType)type) == LLAssetType::AT_CLOTHING) { - removeWearable((LLWearableType::EType)type, true, 0); + 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); } } } - S32 count = wearables.count(); - llassert(items.count() == count); - - S32 i; for (i = 0; i < count; i++) { LLViewerWearable* new_wearable = wearables[i]; diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h index 5be4648636..f2f224a573 100644 --- a/indra/newview/llagentwearables.h +++ b/indra/newview/llagentwearables.h @@ -146,7 +146,7 @@ private: // Removing wearables //-------------------------------------------------------------------- public: - void removeWearable(const LLWearableType::EType type, bool do_remove_all /*= false*/, U32 index /*= 0*/); + void removeWearable(const LLWearableType::EType type, bool do_remove_all /*= false*/, U32 index /*= 0*/, BOOL will_replace = false); private: void removeWearableFinal(const LLWearableType::EType type, bool do_remove_all /*= false*/, U32 index /*= 0*/); protected: -- cgit v1.2.3