summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rwxr-xr-xindra/newview/app_settings/settings.xml15
-rwxr-xr-xindra/newview/llvoavatar.cpp6
2 files changed, 20 insertions, 1 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 000362ebfd..bd035899d0 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -654,6 +654,21 @@
<key>Value</key>
<integer>2</integer>
</map>
+ <key>AvatarPosFinalOffset</key>
+ <map>
+ <key>Comment</key>
+ <string>After-everything-else fixup for avatar position.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Vector3</string>
+ <key>Value</key>
+ <array>
+ <real>0.0</real>
+ <real>0.0</real>
+ <real>0.0</real>
+ </array>
+ </map>
<key>AvatarPickerURL</key>
<map>
<key>Comment</key>
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());
}