diff options
author | Stinson Linden <stinson@lindenlab.com> | 2014-06-02 22:32:16 +0100 |
---|---|---|
committer | Stinson Linden <stinson@lindenlab.com> | 2014-06-02 22:32:16 +0100 |
commit | 8392fde6f6a4dfdb2a78382f3587ecd5a6d937ff (patch) | |
tree | 5c0b89998c072175cd1d1cb3c429a127af8f04d6 /indra/llcharacter | |
parent | 4885c122eaf1b4e304ce598f308d806322efacfc (diff) | |
parent | 51e0cc8140a2cbe92363cb902144ccc9bf34b7c7 (diff) |
Pull and merge from ssh://hg@bitbucket.org/lindenlab/viewer-drtvwr-365.
Diffstat (limited to 'indra/llcharacter')
-rwxr-xr-x | indra/llcharacter/llmotioncontroller.cpp | 7 | ||||
-rwxr-xr-x | indra/llcharacter/llvisualparam.cpp | 32 | ||||
-rwxr-xr-x | indra/llcharacter/llvisualparam.h | 3 |
3 files changed, 38 insertions, 4 deletions
diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp index 50ccfd75fb..e02b139608 100755 --- a/indra/llcharacter/llmotioncontroller.cpp +++ b/indra/llcharacter/llmotioncontroller.cpp @@ -172,6 +172,13 @@ void LLMotionController::deleteAllMotions() for_each(mAllMotions.begin(), mAllMotions.end(), DeletePairedPointer()); mAllMotions.clear(); + + // stinson 05/12/20014 : Ownership of the LLMotion pointers is transferred from + // mAllMotions to mDeprecatedMotions in method + // LLMotionController::deprecateMotionInstance(). Thus, we should also clean + // up the mDeprecatedMotions list as well. + for_each(mDeprecatedMotions.begin(), mDeprecatedMotions.end(), DeletePointer()); + mDeprecatedMotions.clear(); } //----------------------------------------------------------------------------- diff --git a/indra/llcharacter/llvisualparam.cpp b/indra/llcharacter/llvisualparam.cpp index 17c003d07e..2235496ac5 100755 --- a/indra/llcharacter/llvisualparam.cpp +++ b/indra/llcharacter/llvisualparam.cpp @@ -159,26 +159,42 @@ void LLVisualParamInfo::toStream(std::ostream &out) //----------------------------------------------------------------------------- // LLVisualParam() //----------------------------------------------------------------------------- -LLVisualParam::LLVisualParam() - : - mCurWeight( 0.f ), +LLVisualParam::LLVisualParam() + : mCurWeight( 0.f ), mLastWeight( 0.f ), mNext( NULL ), mTargetWeight( 0.f ), mIsAnimating( FALSE ), + mIsDummy(FALSE), mID( -1 ), mInfo( 0 ), - mIsDummy(FALSE), mParamLocation(LOC_UNKNOWN) { } //----------------------------------------------------------------------------- +// LLVisualParam() +//----------------------------------------------------------------------------- +LLVisualParam::LLVisualParam(const LLVisualParam& pOther) + : mCurWeight(pOther.mCurWeight), + mLastWeight(pOther.mLastWeight), + mNext(pOther.mNext), + mTargetWeight(pOther.mTargetWeight), + mIsAnimating(pOther.mIsAnimating), + mIsDummy(pOther.mIsDummy), + mID(pOther.mID), + mInfo(pOther.mInfo), + mParamLocation(pOther.mParamLocation) +{ +} + +//----------------------------------------------------------------------------- // ~LLVisualParam() //----------------------------------------------------------------------------- LLVisualParam::~LLVisualParam() { delete mNext; + mNext = NULL; } /* @@ -285,6 +301,14 @@ void LLVisualParam::setNextParam( LLVisualParam *next ) } //----------------------------------------------------------------------------- +// clearNextParam() +//----------------------------------------------------------------------------- +void LLVisualParam::clearNextParam() +{ + mNext = NULL; +} + +//----------------------------------------------------------------------------- // animate() //----------------------------------------------------------------------------- void LLVisualParam::animate( F32 delta) diff --git a/indra/llcharacter/llvisualparam.h b/indra/llcharacter/llvisualparam.h index 6c3bf2901a..c6b97d7e8b 100755 --- a/indra/llcharacter/llvisualparam.h +++ b/indra/llcharacter/llvisualparam.h @@ -155,6 +155,7 @@ public: LLVisualParam* getNextParam() { return mNext; } void setNextParam( LLVisualParam *next ); + void clearNextParam(); virtual void setAnimating(BOOL is_animating) { mIsAnimating = is_animating && !mIsDummy; } BOOL getAnimating() const { return mIsAnimating; } @@ -165,6 +166,8 @@ public: EParamLocation getParamLocation() const { return mParamLocation; } protected: + LLVisualParam(const LLVisualParam& pOther); + F32 mCurWeight; // current weight F32 mLastWeight; // last weight LLVisualParam* mNext; // next param in a shared chain |