summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
-rw-r--r--indra/newview/llviewerobject.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 5ca6b25a18..29b2a217cc 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -4137,8 +4137,20 @@ const LLVector3 LLViewerObject::getRenderPosition() const
{
if (mDrawable.notNull() && mDrawable->isState(LLDrawable::RIGGED))
{
+ LLControlAvatar *cav = getControlAvatar();
+ if (isRoot() && cav)
+ {
+ F32 fixup;
+ if ( cav->hasPelvisFixup( fixup) )
+ {
+ //Apply a pelvis fixup (as defined by the avs skin)
+ LLVector3 pos = mDrawable->getPositionAgent();
+ pos[VZ] += fixup;
+ return pos;
+ }
+ }
LLVOAvatar* avatar = getAvatar();
- if (avatar && !getControlAvatar())
+ if ((avatar) && !getControlAvatar())
{
return avatar->getPositionAgent();
}