From 1840a2a6926f6c6121fd7eb283e4a1c5bd817024 Mon Sep 17 00:00:00 2001 From: prep Date: Mon, 23 May 2011 16:55:23 -0400 Subject: Fix for sh-788 --- indra/newview/llvoavatar.cpp | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'indra') 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."<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(); + } } } } -- cgit v1.2.3