diff options
Diffstat (limited to 'indra/llcharacter')
-rw-r--r-- | indra/llcharacter/llcharacter.cpp | 9 | ||||
-rw-r--r-- | indra/llcharacter/llcharacter.h | 3 | ||||
-rw-r--r-- | indra/llcharacter/llmotioncontroller.cpp | 17 | ||||
-rw-r--r-- | indra/llcharacter/llmotioncontroller.h | 3 |
4 files changed, 32 insertions, 0 deletions
diff --git a/indra/llcharacter/llcharacter.cpp b/indra/llcharacter/llcharacter.cpp index 583f01cf91..c6ed3e6b5d 100644 --- a/indra/llcharacter/llcharacter.cpp +++ b/indra/llcharacter/llcharacter.cpp @@ -170,6 +170,15 @@ void LLCharacter::updateMotion(BOOL force_update) //----------------------------------------------------------------------------- +// deactivateAllMotions() +//----------------------------------------------------------------------------- +void LLCharacter::deactivateAllMotions() +{ + mMotionController.deactivateAllMotions(); +} + + +//----------------------------------------------------------------------------- // flushAllMotions() //----------------------------------------------------------------------------- void LLCharacter::flushAllMotions() diff --git a/indra/llcharacter/llcharacter.h b/indra/llcharacter/llcharacter.h index 44fb6d0833..8f720d3b84 100644 --- a/indra/llcharacter/llcharacter.h +++ b/indra/llcharacter/llcharacter.h @@ -150,6 +150,9 @@ public: // no cached references to character joint data. This is // useful if a character wants to rebuild it's skeleton. virtual void flushAllMotions(); + + // Flush only wipes active animations. + virtual void deactivateAllMotions(); // dumps information for debugging virtual void dumpCharacter( LLJoint *joint = NULL ); diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp index 71bbdfb932..fad69fc6e9 100644 --- a/indra/llcharacter/llmotioncontroller.cpp +++ b/indra/llcharacter/llmotioncontroller.cpp @@ -835,6 +835,23 @@ LLMotion *LLMotionController::findMotion(const LLUUID& id) return mAllMotions[id]; } +//----------------------------------------------------------------------------- +// deactivateAllMotions() +//----------------------------------------------------------------------------- +void LLMotionController::deactivateAllMotions() +{ + //They must all die, precious. + for (std::map<LLUUID, LLMotion*>::iterator iter = mAllMotions.begin(); + iter != mAllMotions.end(); iter++) + { + LLMotion* motionp = iter->second; + if (motionp) motionp->deactivate(); + } + + // delete all motion instances + deleteAllMotions(); +} + //----------------------------------------------------------------------------- // flushAllMotions() diff --git a/indra/llcharacter/llmotioncontroller.h b/indra/llcharacter/llmotioncontroller.h index a19e704643..15791b6318 100644 --- a/indra/llcharacter/llmotioncontroller.h +++ b/indra/llcharacter/llmotioncontroller.h @@ -138,6 +138,9 @@ public: // releases all motion instances void flushAllMotions(); + //Flush is a liar. + void deactivateAllMotions(); + // pause and continue all motions void pause(); void unpause(); |