summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2010-12-03 15:41:53 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2010-12-03 15:41:53 -0500
commitfaa08ed4a17934dc7bd901c4b3ab9cef2dda103e (patch)
treeddcf1750664201b9c37d3c523170ecd8e5110aa4 /indra/newview/llvoavatar.cpp
parent2f4a3197bfdb5200d4472343b729fe7ff7eb9225 (diff)
parent4e922949a9a1e508a698ce5a03657f1417252d9f (diff)
merge
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r--indra/newview/llvoavatar.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 7e9a6f64f2..34345f2471 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -3447,14 +3447,14 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
LLVector3d ground_under_pelvis;
if (isSelf())
- {
- if ( !mHasPelvisOffset )
- {
- gAgent.setPositionAgent(getRenderPosition());
- }
- else
- {
- gAgent.setPositionAgent( getRenderPosition() + mPelvisOffset );
+ {
+ if ( !mHasPelvisOffset )
+ {
+ gAgent.setPositionAgent(getRenderPosition());
+ }
+ else
+ {
+ gAgent.setPositionAgent( getRenderPosition() + mPelvisOffset );
}
}
@@ -3472,22 +3472,22 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
mInAir = in_air;
// correct for the fact that the pelvis is not necessarily the center
- // of the agent's physical representation
+ // of the agent's physical representation
root_pos.mdV[VZ] -= (0.5f * mBodySize.mV[VZ]) - mPelvisToFoot;
LLVector3 newPosition = gAgent.getPosAgentFromGlobal(root_pos);
if (newPosition != mRoot.getXform()->getWorldPosition())
{
- if ( !mHasPelvisOffset )
- {
- mRoot.touch();
- mRoot.setWorldPosition( newPosition ); // regular update
- }
- else
- {
- mRoot.touch();
- mRoot.setWorldPosition( newPosition + mPelvisOffset );
+ if ( !mHasPelvisOffset )
+ {
+ mRoot.touch();
+ mRoot.setWorldPosition( newPosition ); // regular update
+ }
+ else
+ {
+ mRoot.touch();
+ mRoot.setWorldPosition( newPosition + mPelvisOffset );
}
}
@@ -3792,21 +3792,21 @@ void LLVOAvatar::updateHeadOffset()
//------------------------------------------------------------------------
// setPelvisOffset
//------------------------------------------------------------------------
-void LLVOAvatar::setPelvisOffset( bool hasOffset, const LLVector3& offsetAmount )
-{
- mHasPelvisOffset = hasOffset;
- if ( mHasPelvisOffset )
- {
- mPelvisOffset = offsetAmount;
- }
-}
+void LLVOAvatar::setPelvisOffset( bool hasOffset, const LLVector3& offsetAmount )
+{
+ mHasPelvisOffset = hasOffset;
+ if ( mHasPelvisOffset )
+ {
+ mPelvisOffset = offsetAmount;
+ }
+}
//------------------------------------------------------------------------
// postPelvisSetRecalc
//------------------------------------------------------------------------
void LLVOAvatar::postPelvisSetRecalc( void )
{
- computeBodySize();
- mRoot.updateWorldMatrixChildren();
+ computeBodySize();
+ mRoot.updateWorldMatrixChildren();
dirtyMesh();
updateHeadOffset();
}
@@ -4975,7 +4975,7 @@ void LLVOAvatar::resetJointPositionsToDefault( void )
//restore joints to default positions, however skip over the pelvis
if ( pJoint && pPelvis != pJoint )
{
- pJoint->restoreToDefaultXform();
+ pJoint->restoreOldXform();
}
}
//make sure we don't apply the joint offset