summaryrefslogtreecommitdiff
path: root/indra/llcharacter/llmotioncontroller.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2010-04-29 15:58:50 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2010-04-29 15:58:50 -0400
commite9effbe73a995b7356ae711a3406f253a779005f (patch)
tree6a6ba9ac09ab2cb778a26893bd8afd9e95593441 /indra/llcharacter/llmotioncontroller.cpp
parent969a4bf934030fe543cd9b05e3ef1e2da0ba11d1 (diff)
For EXT-6953: Evaluate and implement Richard's improved default animations. New versions of animations fix looping and other problems, reduced log spam.
Diffstat (limited to 'indra/llcharacter/llmotioncontroller.cpp')
-rw-r--r--indra/llcharacter/llmotioncontroller.cpp27
1 files changed, 26 insertions, 1 deletions
diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp
index 6df72a4d9b..80d98a1cee 100644
--- a/indra/llcharacter/llmotioncontroller.cpp
+++ b/indra/llcharacter/llmotioncontroller.cpp
@@ -552,6 +552,26 @@ void LLMotionController::updateIdleActiveMotions()
}
}
+
+void breakWalkIf(LLMotion *motionp, BOOL flag)
+{
+ if (
+ (motionp->getID() == ANIM_AGENT_FEMALE_WALK) ||
+ (motionp->getID() == ANIM_AGENT_FEMALE_WALK_NEW) ||
+ (motionp->getID() == ANIM_AGENT_FEMALE_RUN_NEW) ||
+ (motionp->getID() == ANIM_AGENT_FEMALE_WALK_NEW) ||
+ (motionp->getID() == ANIM_AGENT_WALK) ||
+ (motionp->getID() == ANIM_AGENT_RUN) ||
+ (motionp->getID() == ANIM_AGENT_RUN_NEW)
+ )
+ {
+ if (flag)
+ {
+ llinfos << "break here" << llendl;
+ }
+ }
+}
+
//-----------------------------------------------------------------------------
// updateMotionsByType()
//-----------------------------------------------------------------------------
@@ -690,6 +710,7 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty
// perform motion update
update_result = motionp->onUpdate(mAnimTime - motionp->mActivationTimestamp, last_joint_signature);
+ breakWalkIf(motionp,!update_result);
}
//**********************
@@ -712,7 +733,9 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty
}
// perform motion update
+ breakWalkIf(motionp,TRUE);
update_result = motionp->onUpdate(mAnimTime - motionp->mActivationTimestamp, last_joint_signature);
+ breakWalkIf(motionp,!update_result);
}
//**********************
@@ -735,11 +758,13 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty
}
// perform motion update
update_result = motionp->onUpdate(mAnimTime - motionp->mActivationTimestamp, last_joint_signature);
+ breakWalkIf(motionp,!update_result);
}
else
{
posep->setWeight(0.f);
update_result = motionp->onUpdate(0.f, last_joint_signature);
+ breakWalkIf(motionp,!update_result);
}
// allow motions to deactivate themselves
@@ -815,7 +840,7 @@ void LLMotionController::updateMotions(bool force_update)
{
if (mIsSelf)
{
- dumpMotions();
+ //dumpMotions();
}
BOOL use_quantum = (mTimeStep != 0.f);