diff options
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r-- | indra/newview/llvoavatar.cpp | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index b6d1d2443d..43a9e29f4b 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -3477,7 +3477,14 @@ 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; + if ( !mHasPelvisOffset )
+ {
+ root_pos.mdV[VZ] -= (0.5f * mBodySize.mV[VZ]) - mPelvisToFoot; + } + else + {
+ root_pos.mdV[VZ] -= (0.5f * mBodySize.mV[VZ]) - mPelvisToFoot; + } LLVector3 newPosition = gAgent.getPosAgentFromGlobal(root_pos); @@ -3805,7 +3812,16 @@ void LLVOAvatar::setPelvisOffset( bool hasOffset, const LLVector3& offsetAmount mPelvisOffset = offsetAmount;
}
}
- +//------------------------------------------------------------------------ +// postPelvisSetRecalc +//------------------------------------------------------------------------ +void LLVOAvatar::postPelvisSetRecalc( void ) +{ + computeBodySize();
+ mRoot.updateWorldMatrixChildren();
+ dirtyMesh(); + updateHeadOffset(); +} //------------------------------------------------------------------------ // updateVisibility() //------------------------------------------------------------------------ @@ -4976,6 +4992,7 @@ void LLVOAvatar::resetJointPositionsToDefault( void ) } //make sure we don't apply the joint offset mHasPelvisOffset = false; + postPelvisSetRecalc(); } |