diff options
author | prep linden <prep@lindenlab.com> | 2010-12-03 13:02:34 -0500 |
---|---|---|
committer | prep linden <prep@lindenlab.com> | 2010-12-03 13:02:34 -0500 |
commit | 4e922949a9a1e508a698ce5a03657f1417252d9f (patch) | |
tree | 01bee4096bb698e858e3e4ea60a428e92e052f4c /indra/newview/llvoavatar.cpp | |
parent | 963e3346b1c81590d0c31097912e6481515f3722 (diff) |
Fix for SH-479
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r-- | indra/newview/llvoavatar.cpp | 58 |
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 |