diff options
Diffstat (limited to 'indra/llcharacter')
-rwxr-xr-x | indra/llcharacter/lljoint.cpp | 13 | ||||
-rwxr-xr-x | indra/llcharacter/lljoint.h | 1 |
2 files changed, 5 insertions, 9 deletions
diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp index 672d9faee4..5cd33fe709 100755 --- a/indra/llcharacter/lljoint.cpp +++ b/indra/llcharacter/lljoint.cpp @@ -248,20 +248,18 @@ void LLJoint::setPosition( const LLVector3& pos ) // setPosition() //-------------------------------------------------------------------- void LLJoint::setDefaultFromCurrentXform( void ) -{ +{ mDefaultXform = mXform; - touch(ALL_DIRTY); } //-------------------------------------------------------------------- // storeCurrentXform() //-------------------------------------------------------------------- void LLJoint::storeCurrentXform( const LLVector3& pos ) -{ +{ mOldXform = mXform; mResetAfterRestoreOldXform = true; setPosition( pos ); - touch(ALL_DIRTY); } @@ -277,10 +275,9 @@ void LLJoint::storeScaleForReset( const LLVector3& scale ) //-------------------------------------------------------------------- void LLJoint::restoreOldXform( void ) { - mXform = mOldXform; - mXform.setScaleChildOffset( mOldXform.getScaleChildOffset() ); + mXform = mDefaultXform; mResetAfterRestoreOldXform = false; - mDirtyFlags = ALL_DIRTY; + mDirtyFlags = ALL_DIRTY; } //-------------------------------------------------------------------- // getWorldPosition() @@ -298,8 +295,6 @@ LLVector3 LLJoint::getLastWorldPosition() { return mXform.getWorldPosition(); } - - //-------------------------------------------------------------------- // setWorldPosition() //-------------------------------------------------------------------- diff --git a/indra/llcharacter/lljoint.h b/indra/llcharacter/lljoint.h index aeb16f796a..a6a439a965 100755 --- a/indra/llcharacter/lljoint.h +++ b/indra/llcharacter/lljoint.h @@ -196,6 +196,7 @@ public: //If the old transform flag has been set, then the reset logic in avatar needs to be aware(test) of it const BOOL doesJointNeedToBeReset( void ) const { return mResetAfterRestoreOldXform; } + void setJointResetFlag( bool val ) { mResetAfterRestoreOldXform = val; } }; #endif // LL_LLJOINT_H |