diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2014-09-25 17:37:46 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2014-09-25 17:37:46 -0400 |
commit | 2e0a8231d2ab9be0300083cb3d793bf57fcfb793 (patch) | |
tree | 7fdd291a734f067a5782c6fa658d837d337a09f7 /indra/newview/llvoavatar.cpp | |
parent | b021c90e7bccdd0f9a916946e7716a00034254c2 (diff) |
Simple viewer-side hack to adjust avatar position
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rwxr-xr-x | indra/newview/llvoavatar.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 9f42776d78..dd7d42ee25 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -3412,9 +3412,11 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) // correct for the fact that the pelvis is not necessarily the center // of the agent's physical representation root_pos.mdV[VZ] -= (0.5f * mBodySize.mV[VZ]) - mPelvisToFoot; + root_pos += LLVector3d(gSavedSettings.getVector3("AvatarPosFinalOffset")); LLVector3 newPosition = gAgent.getPosAgentFromGlobal(root_pos); + if (newPosition != mRoot->getXform()->getWorldPosition()) { mRoot->touch(); @@ -3580,7 +3582,9 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) } else if (mDrawable.notNull()) { - mRoot->setPosition(mDrawable->getPosition()); + LLVector3 pos = mDrawable->getPosition(); + pos += gSavedSettings.getVector3("AvatarPosFinalOffset"); + mRoot->setPosition(pos); mRoot->setRotation(mDrawable->getRotation()); } |