diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llcharacter/llmotioncontroller.cpp | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/linden/indra/llcharacter/llmotioncontroller.cpp b/linden/indra/llcharacter/llmotioncontroller.cpp index 3ef35ec..2427fd8 100644 --- a/linden/indra/llcharacter/llmotioncontroller.cpp +++ b/linden/indra/llcharacter/llmotioncontroller.cpp | |||
@@ -360,7 +360,7 @@ BOOL LLMotionController::startMotion(const LLUUID &id, F32 start_offset) | |||
360 | { | 360 | { |
361 | if (motion->isStopped()) // motion has been stopped | 361 | if (motion->isStopped()) // motion has been stopped |
362 | { | 362 | { |
363 | deactivateMotion(motion); | 363 | deactivateMotion(motion, false); |
364 | } | 364 | } |
365 | else if (mTime < motion->mSendStopTimestamp) // motion is still active | 365 | else if (mTime < motion->mSendStopTimestamp) // motion is still active |
366 | { | 366 | { |
@@ -396,7 +396,7 @@ BOOL LLMotionController::stopMotionLocally(const LLUUID &id, BOOL stop_immediate | |||
396 | 396 | ||
397 | if (stop_immediate) | 397 | if (stop_immediate) |
398 | { | 398 | { |
399 | deactivateMotion(motion); | 399 | deactivateMotion(motion, false); |
400 | } | 400 | } |
401 | return TRUE; | 401 | return TRUE; |
402 | } | 402 | } |
@@ -492,7 +492,7 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty | |||
492 | { | 492 | { |
493 | if (motionp->isStopped() && mTime > motionp->getStopTime() + motionp->getEaseOutDuration()) | 493 | if (motionp->isStopped() && mTime > motionp->getStopTime() + motionp->getEaseOutDuration()) |
494 | { | 494 | { |
495 | deactivateMotion(motionp); | 495 | deactivateMotion(motionp, false); |
496 | } | 496 | } |
497 | else if (motionp->isStopped() && mTime > motionp->getStopTime()) | 497 | else if (motionp->isStopped() && mTime > motionp->getStopTime()) |
498 | { | 498 | { |
@@ -546,8 +546,7 @@ 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); | 549 | deactivateMotion(motionp, true); |
550 | deactivateMotion(motionp); | ||
551 | } | 550 | } |
552 | continue; | 551 | continue; |
553 | } | 552 | } |
@@ -573,8 +572,7 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty | |||
573 | } | 572 | } |
574 | else | 573 | else |
575 | { | 574 | { |
576 | posep->setWeight(0.f); | 575 | deactivateMotion(motionp, true); |
577 | deactivateMotion(motionp); | ||
578 | continue; | 576 | continue; |
579 | } | 577 | } |
580 | } | 578 | } |
@@ -822,8 +820,15 @@ BOOL LLMotionController::activateMotion(LLMotion *motion, F32 time) | |||
822 | //----------------------------------------------------------------------------- | 820 | //----------------------------------------------------------------------------- |
823 | // deactivateMotion() | 821 | // deactivateMotion() |
824 | //----------------------------------------------------------------------------- | 822 | //----------------------------------------------------------------------------- |
825 | BOOL LLMotionController::deactivateMotion(LLMotion *motion) | 823 | BOOL LLMotionController::deactivateMotion(LLMotion *motion, bool remove_weight) |
826 | { | 824 | { |
825 | if( remove_weight ) | ||
826 | { | ||
827 | // immediately remove pose weighting instead of letting it time out | ||
828 | LLPose *posep = motion->getPose(); | ||
829 | posep->setWeight(0.f); | ||
830 | } | ||
831 | |||
827 | motion->deactivate(); | 832 | motion->deactivate(); |
828 | mActiveMotions.remove(motion); | 833 | mActiveMotions.remove(motion); |
829 | 834 | ||