summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
authorprep linden <prep@lindenlab.com>2011-01-14 15:00:19 -0500
committerprep linden <prep@lindenlab.com>2011-01-14 15:00:19 -0500
commita678ff80af6c48d4232c52aa505b633a1fc22663 (patch)
treea11ab480aed6cda64335a6f0b5adf2c0b1088b41 /indra/newview/llvoavatar.cpp
parent53d03606f13d52b4282e91e391eb761dbd96a1ad (diff)
voice dot is positioned consistently
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r--indra/newview/llvoavatar.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index b667dc1af0..ffe61485d6 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -2446,9 +2446,19 @@ void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled)
// here we get the approximate head position and set as sound source for the voice symbol
// (the following version uses a tweak of "mHeadOffset" which handle sitting vs. standing)
//--------------------------------------------------------------------------------------------
- LLVector3 headOffset = LLVector3( 0.0f, 0.0f, mHeadOffset.mV[2] );
- mVoiceVisualizer->setVoiceSourceWorldPosition( mRoot.getWorldPosition() + headOffset );
+ if ( mIsSitting )
+ {
+ LLVector3 headOffset = LLVector3( 0.0f, 0.0f, mHeadOffset.mV[2] );
+ mVoiceVisualizer->setVoiceSourceWorldPosition( mRoot.getWorldPosition() + headOffset );
+ }
+ else
+ {
+ LLVector3 tagPos = mRoot.getWorldPosition();
+ tagPos[VZ] -= mPelvisToFoot;
+ tagPos[VZ] += ( mBodySize[VZ] + 0.125f );
+ mVoiceVisualizer->setVoiceSourceWorldPosition( tagPos );
+ }
}//if ( voiceEnabled )
}