diff options
| author | Don Kjer <don@lindenlab.com> | 2007-07-02 17:10:30 +0000 |
|---|---|---|
| committer | Don Kjer <don@lindenlab.com> | 2007-07-02 17:10:30 +0000 |
| commit | e5124431b54d4342d4677371fccca5bc7250c079 (patch) | |
| tree | 8c9636e78e93cef6ed099d9abd72ec9ccbbf35fe /indra/llcharacter/llmotioncontroller.cpp | |
| parent | ce5e13630cd8f4174549a3ec4ae8c24eec90bb3d (diff) | |
svn merge -r 64079:64548 svn+ssh://svn/svn/linden/branches/maintenance into release
Diffstat (limited to 'indra/llcharacter/llmotioncontroller.cpp')
| -rw-r--r-- | indra/llcharacter/llmotioncontroller.cpp | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp index fad69fc6e9..592a6bae2c 100644 --- a/indra/llcharacter/llmotioncontroller.cpp +++ b/indra/llcharacter/llmotioncontroller.cpp @@ -340,7 +340,7 @@ BOOL LLMotionController::startMotion(const LLUUID &id, F32 start_offset) { if (motion->isStopped()) // motion has been stopped { - deactivateMotion(motion); + deactivateMotion(motion, false); } else if (mTime < motion->mSendStopTimestamp) // motion is still active { @@ -376,7 +376,7 @@ BOOL LLMotionController::stopMotionLocally(const LLUUID &id, BOOL stop_immediate if (stop_immediate) { - deactivateMotion(motion); + deactivateMotion(motion, false); } return TRUE; } @@ -472,7 +472,7 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty { if (motionp->isStopped() && mTime > motionp->getStopTime() + motionp->getEaseOutDuration()) { - deactivateMotion(motionp); + deactivateMotion(motionp, false); } else if (motionp->isStopped() && mTime > motionp->getStopTime()) { @@ -526,8 +526,7 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty { if (motionp->isStopped() && mTime > motionp->getStopTime() + motionp->getEaseOutDuration()) { - posep->setWeight(0.f); - deactivateMotion(motionp); + deactivateMotion(motionp, true); } continue; } @@ -553,8 +552,7 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty } else { - posep->setWeight(0.f); - deactivateMotion(motionp); + deactivateMotion(motionp, true); continue; } } @@ -802,8 +800,15 @@ BOOL LLMotionController::activateMotion(LLMotion *motion, F32 time) //----------------------------------------------------------------------------- // deactivateMotion() //----------------------------------------------------------------------------- -BOOL LLMotionController::deactivateMotion(LLMotion *motion) +BOOL LLMotionController::deactivateMotion(LLMotion *motion, bool remove_weight) { + if( remove_weight ) + { + // immediately remove pose weighting instead of letting it time out + LLPose *posep = motion->getPose(); + posep->setWeight(0.f); + } + motion->deactivate(); mActiveMotions.remove(motion); |
