summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
authorprep <prep@lindenlab.com>2011-01-05 16:07:16 -0500
committerprep <prep@lindenlab.com>2011-01-05 16:07:16 -0500
commit5b09da5079d576678eb5d66a5518044d1b22664f (patch)
tree790de1b6cb471be1f57425c81b369a01ba012156 /indra/newview/llvoavatar.cpp
parentdfddccd65da32ac2c11c9106c3995a3281d7c30d (diff)
Fix for SH-579
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r--indra/newview/llvoavatar.cpp24
1 files changed, 22 insertions, 2 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 9aa86ebed0..ded3e36cf6 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -4962,6 +4962,28 @@ void LLVOAvatar::resetJointPositions( void )
mHasPelvisOffset = false;
}
//-----------------------------------------------------------------------------
+// resetSpecificJointPosition
+//-----------------------------------------------------------------------------
+void LLVOAvatar::resetSpecificJointPosition( const std::string& name )
+{
+ LLJoint* pJoint = mRoot.findJoint( name );
+
+ if ( pJoint )
+ {
+ pJoint->restoreOldXform();
+ pJoint->setId( LLUUID::null );
+ //If we're reseting the pelvis position make sure not to apply offset
+ if ( name == "mPelvis" )
+ {
+ mHasPelvisOffset = false;
+ }
+ }
+ else
+ {
+ llinfos<<"Did not find "<< name.c_str()<<llendl;
+ }
+}
+//-----------------------------------------------------------------------------
// resetJointPositionsToDefault
//-----------------------------------------------------------------------------
void LLVOAvatar::resetJointPositionsToDefault( void )
@@ -4995,8 +5017,6 @@ void LLVOAvatar::resetJointPositionsToDefault( void )
mHasPelvisOffset = false;
postPelvisSetRecalc();
}
-
-
//-----------------------------------------------------------------------------
// getCharacterPosition()
//-----------------------------------------------------------------------------