From e9effbe73a995b7356ae711a3406f253a779005f Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 29 Apr 2010 15:58:50 -0400 Subject: For EXT-6953: Evaluate and implement Richard's improved default animations. New versions of animations fix looping and other problems, reduced log spam. --- indra/llcharacter/llmotioncontroller.cpp | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'indra/llcharacter/llmotioncontroller.cpp') 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); -- cgit v1.2.3