diff options
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 |