diff options
author | Jacek Antonelli | 2008-08-15 23:44:58 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:58 -0500 |
commit | 089fc07d207c71ce1401e72f09c31ad8c45872e2 (patch) | |
tree | 0028955add042c6f45b47a7b774adeeac9c592cb /linden/indra/llcharacter/llmotioncontroller.cpp | |
parent | Second Life viewer sources 1.16.0.5 (diff) | |
download | meta-impy-089fc07d207c71ce1401e72f09c31ad8c45872e2.zip meta-impy-089fc07d207c71ce1401e72f09c31ad8c45872e2.tar.gz meta-impy-089fc07d207c71ce1401e72f09c31ad8c45872e2.tar.bz2 meta-impy-089fc07d207c71ce1401e72f09c31ad8c45872e2.tar.xz |
Second Life viewer sources 1.17.0.12
Diffstat (limited to 'linden/indra/llcharacter/llmotioncontroller.cpp')
-rw-r--r-- | linden/indra/llcharacter/llmotioncontroller.cpp | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/linden/indra/llcharacter/llmotioncontroller.cpp b/linden/indra/llcharacter/llmotioncontroller.cpp index 5545841..e2453c9 100644 --- a/linden/indra/llcharacter/llmotioncontroller.cpp +++ b/linden/indra/llcharacter/llmotioncontroller.cpp | |||
@@ -546,7 +546,6 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty | |||
546 | { | 546 | { |
547 | if (motionp->isStopped() && mTime > motionp->getStopTime() + motionp->getEaseOutDuration()) | 547 | if (motionp->isStopped() && mTime > motionp->getStopTime() + motionp->getEaseOutDuration()) |
548 | { | 548 | { |
549 | posep->setWeight(0.f); | ||
550 | deactivateMotion(motionp); | 549 | deactivateMotion(motionp); |
551 | } | 550 | } |
552 | continue; | 551 | continue; |
@@ -573,7 +572,6 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty | |||
573 | } | 572 | } |
574 | else | 573 | else |
575 | { | 574 | { |
576 | posep->setWeight(0.f); | ||
577 | deactivateMotion(motionp); | 575 | deactivateMotion(motionp); |
578 | continue; | 576 | continue; |
579 | } | 577 | } |
@@ -824,6 +822,7 @@ BOOL LLMotionController::activateMotion(LLMotion *motion, F32 time) | |||
824 | //----------------------------------------------------------------------------- | 822 | //----------------------------------------------------------------------------- |
825 | BOOL LLMotionController::deactivateMotion(LLMotion *motion) | 823 | BOOL LLMotionController::deactivateMotion(LLMotion *motion) |
826 | { | 824 | { |
825 | motion->getPose()->setWeight(0.f); | ||
827 | motion->deactivate(); | 826 | motion->deactivate(); |
828 | mActiveMotions.remove(motion); | 827 | mActiveMotions.remove(motion); |
829 | 828 | ||
@@ -855,6 +854,23 @@ LLMotion *LLMotionController::findMotion(const LLUUID& id) | |||
855 | return mAllMotions[id]; | 854 | return mAllMotions[id]; |
856 | } | 855 | } |
857 | 856 | ||
857 | //----------------------------------------------------------------------------- | ||
858 | // deactivateAllMotions() | ||
859 | //----------------------------------------------------------------------------- | ||
860 | void LLMotionController::deactivateAllMotions() | ||
861 | { | ||
862 | //They must all die, precious. | ||
863 | for (std::map<LLUUID, LLMotion*>::iterator iter = mAllMotions.begin(); | ||
864 | iter != mAllMotions.end(); iter++) | ||
865 | { | ||
866 | LLMotion* motionp = iter->second; | ||
867 | if (motionp) motionp->deactivate(); | ||
868 | } | ||
869 | |||
870 | // delete all motion instances | ||
871 | deleteAllMotions(); | ||
872 | } | ||
873 | |||
858 | 874 | ||
859 | //----------------------------------------------------------------------------- | 875 | //----------------------------------------------------------------------------- |
860 | // flushAllMotions() | 876 | // flushAllMotions() |