diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2010-05-07 15:10:50 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2010-05-07 15:10:50 -0400 |
commit | 9e5fe84c9e6f6027878d70350c8f60e4c2be7e48 (patch) | |
tree | 3309f360e02cd2c3d823076ead72f7a35f38c25c /indra/llcharacter | |
parent | 6081ad52c3711010e03c26679849921d4e5968bc (diff) |
For EXT-6953: Evaluate and implement Richard's improved default animations. Cleanup and log spam reduction.
Diffstat (limited to 'indra/llcharacter')
-rw-r--r-- | indra/llcharacter/llanimationstates.cpp | 3 | ||||
-rw-r--r-- | indra/llcharacter/llkeyframewalkmotion.cpp | 26 | ||||
-rw-r--r-- | indra/llcharacter/llmotioncontroller.cpp | 37 |
3 files changed, 12 insertions, 54 deletions
diff --git a/indra/llcharacter/llanimationstates.cpp b/indra/llcharacter/llanimationstates.cpp index bcc28cfc8f..879f97deec 100644 --- a/indra/llcharacter/llanimationstates.cpp +++ b/indra/llcharacter/llanimationstates.cpp @@ -39,9 +39,6 @@ #include "llanimationstates.h" #include "llstring.h" -// Would be nice to be able to toggle at run-time, but not gonna -// happen while we're using const LLUUIDs as keys. - const LLUUID ANIM_AGENT_AFRAID = LLUUID("6b61c8e8-4747-0d75-12d7-e49ff207a4ca"); const LLUUID ANIM_AGENT_AIM_BAZOOKA_R = LLUUID("b5b4a67d-0aee-30d2-72cd-77b333e932ef"); const LLUUID ANIM_AGENT_AIM_BOW_L = LLUUID("46bb4359-de38-4ed8-6a22-f1f52fe8f506"); diff --git a/indra/llcharacter/llkeyframewalkmotion.cpp b/indra/llcharacter/llkeyframewalkmotion.cpp index 3cf4d695dd..232b617d69 100644 --- a/indra/llcharacter/llkeyframewalkmotion.cpp +++ b/indra/llcharacter/llkeyframewalkmotion.cpp @@ -329,25 +329,23 @@ BOOL LLWalkAdjustMotion::onUpdate(F32 time, U8* joint_mask) { mAnimSpeed = llclamp(mAnimSpeed, -ANIM_SPEED_MAX, -ANIM_SPEED_MIN); } - char debug_text[64]; - sprintf(debug_text, "Foot slip vel: %.2f", footSlipVelocity); - mCharacter->addDebugText(debug_text); - sprintf(debug_text, "Speed: %.2f", mAvgSpeed); - mCharacter->addDebugText(debug_text); - sprintf(debug_text, "Speed Adjust: %.2f", mSpeedAdjust); - mCharacter->addDebugText(debug_text); - sprintf(debug_text, "Animation Playback Speed: %.2f", mAnimSpeed); - mCharacter->addDebugText(debug_text); - mCharacter->setAnimationData("Walk Speed", &mAnimSpeed); +// char debug_text[64]; +// sprintf(debug_text, "Foot slip vel: %.2f", footSlipVelocity); +// mCharacter->addDebugText(debug_text); +// sprintf(debug_text, "Speed: %.2f", mAvgSpeed); +// mCharacter->addDebugText(debug_text); +// sprintf(debug_text, "Speed Adjust: %.2f", mSpeedAdjust); +// mCharacter->addDebugText(debug_text); +// sprintf(debug_text, "Animation Playback Speed: %.2f", mAnimSpeed); +// mCharacter->addDebugText(debug_text); + mCharacter->setAnimationData("Walk Speed", &mAnimSpeed); if (mCharacter->getMotionController().mIsSelf) { F32 elapsed = mCharacter->getMotionController().getFrameTimer().getElapsedTimeF32(); llinfos << "PLOT elapsed: " << elapsed -// << " footSlipVelocity: " << footSlipVelocity -// << " speed: " << speed -// << " mAvgCorrection: " << mAvgCorrection + << " footSlipVelocity: " << footSlipVelocity + << " mAvgCorrection: " << mAvgCorrection << " mAvgSpeed: " << mAvgSpeed -// << " mSpeedAdjust: " << mSpeedAdjust << " mAnimSpeed: " << mAnimSpeed << " ANIM_SPEED_MAX: " << ANIM_SPEED_MAX << " ANIM_SPEED_MIN: " << ANIM_SPEED_MIN diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp index 51a9120cbb..04524dc015 100644 --- a/indra/llcharacter/llmotioncontroller.cpp +++ b/indra/llcharacter/llmotioncontroller.cpp @@ -393,8 +393,6 @@ LLMotion* LLMotionController::createMotion( const LLUUID &id ) //----------------------------------------------------------------------------- BOOL LLMotionController::startMotion(const LLUUID &id, F32 start_offset) { - llinfos << animationName(id) << llendl; - // do we have an instance of this motion for this character? LLMotion *motion = findMotion(id); @@ -453,11 +451,6 @@ BOOL LLMotionController::stopMotionInstance(LLMotion* motion, BOOL stop_immediat // If on active list, stop it if (isMotionActive(motion) && !motion->isStopped()) { - if (motion->getID() == ANIM_AGENT_FEMALE_WALK_NEW || motion->getID() == ANIM_AGENT_FEMALE_WALK) - { - llinfos << "stop female walk: " << animationName(motion->getID()) << llendl; - } - motion->setStopTime(mAnimTime); if (stop_immediate) { @@ -552,26 +545,6 @@ 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_WALK) || - (motionp->getID() == ANIM_AGENT_WALK_NEW) || - (motionp->getID() == ANIM_AGENT_RUN) || - (motionp->getID() == ANIM_AGENT_RUN_NEW) - ) - { - if (flag) - { -// llinfos << "break here" << llendl; - } - } -} - //----------------------------------------------------------------------------- // updateMotionsByType() //----------------------------------------------------------------------------- @@ -710,7 +683,6 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty // perform motion update update_result = motionp->onUpdate(mAnimTime - motionp->mActivationTimestamp, last_joint_signature); - breakWalkIf(motionp,!update_result); } //********************** @@ -733,9 +705,7 @@ 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); } //********************** @@ -758,13 +728,11 @@ 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 @@ -838,11 +806,6 @@ void LLMotionController::updateLoadingMotions() //----------------------------------------------------------------------------- void LLMotionController::updateMotions(bool force_update) { - if (mIsSelf) - { - //dumpMotions(); - } - BOOL use_quantum = (mTimeStep != 0.f); // Always update mPrevTimerElapsed |