summaryrefslogtreecommitdiff
path: root/indra/llcharacter/llmotioncontroller.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcharacter/llmotioncontroller.cpp')
-rw-r--r--indra/llcharacter/llmotioncontroller.cpp21
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);