diff options
author | Loren Shih <seraph@lindenlab.com> | 2011-05-25 09:12:36 -0400 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2011-05-25 09:12:36 -0400 |
commit | e03f25d51a5840d9d4f29d0ee238ed4b881b8cee (patch) | |
tree | 7d8ad6f2fd58abc004388c8174293ee78bb927bd /indra/newview/llvoavatar.cpp | |
parent | bc0df31d1beaa6eddd48431eb9e42d38d3698673 (diff) | |
parent | cb797532c0bd7ca0ab4caf66c48aa55ec99160a0 (diff) |
automated merge mesh-development -> mesh-development
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r-- | indra/newview/llvoavatar.cpp | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index ec2b5a4c98..dc355362ce 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -4968,19 +4968,6 @@ void LLVOAvatar::resetSpecificJointPosition( const std::string& name ) //----------------------------------------------------------------------------- void LLVOAvatar::resetJointPositionsToDefault( void ) { - const LLVector3& avPos = getCharacterPosition(); - - //Reposition the pelvis - LLJoint* pPelvis = mRoot.findJoint("mPelvis"); - if ( pPelvis ) - { - pPelvis->setPosition( avPos + pPelvis->getPosition() ); - } - else - { - llwarns<<"Can't get pelvis joint."<<llendl; - return; - } //Subsequent joints are relative to pelvis for( S32 i = 0; i < (S32)mNumJoints; ++i ) @@ -4991,7 +4978,7 @@ void LLVOAvatar::resetJointPositionsToDefault( void ) pJoint->setId( LLUUID::null ); //restore joints to default positions, however skip over the pelvis - if ( pJoint && pPelvis != pJoint ) + if ( pJoint ) { pJoint->restoreOldXform(); } @@ -6028,6 +6015,14 @@ void LLVOAvatar::cleanupAttachedMesh( LLViewerObject* pVO ) if ( bindCnt > 0 ) { LLVOAvatar::resetJointPositionsToDefault(); + //Need to handle the repositioning of the cam, updating rig data etc during outfit editing + //This handles the case where we detach a replacement rig. + if ( gAgentCamera.cameraCustomizeAvatar() ) + { + gAgent.unpauseAnimation(); + //Still want to refocus on head bone + gAgentCamera.changeCameraToCustomizeAvatar(); + } } } } |