diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2010-05-27 17:04:48 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2010-05-27 17:04:48 -0400 |
commit | d213946c6c8a3adda488e95e669514f6317beeb7 (patch) | |
tree | fe96de62fc61dcb1ec885c996c603a77d20566ec /indra/llcharacter | |
parent | aa9c621cb90de75e919f36ba0f6db9d8bd447601 (diff) |
EXT-6953 WIP - pre-push cleanup after review. Accumulated EXT-6953 commits reviewed by Nyx.
Diffstat (limited to 'indra/llcharacter')
-rw-r--r-- | indra/llcharacter/llanimationstates.cpp | 18 | ||||
-rw-r--r-- | indra/llcharacter/llanimationstates.h | 7 | ||||
-rw-r--r-- | indra/llcharacter/llkeyframewalkmotion.cpp | 2 | ||||
-rw-r--r-- | indra/llcharacter/llmotioncontroller.cpp | 2 |
4 files changed, 16 insertions, 13 deletions
diff --git a/indra/llcharacter/llanimationstates.cpp b/indra/llcharacter/llanimationstates.cpp index 879f97deec..4c24218fc3 100644 --- a/indra/llcharacter/llanimationstates.cpp +++ b/indra/llcharacter/llanimationstates.cpp @@ -412,6 +412,15 @@ void LLAnimationLibrary::animStateSetString( const LLUUID& state, const std::str mAnimMap[state] = mAnimStringTable.addString(name); } +std::string LLAnimationLibrary::animationName( const LLUUID& id ) const +{ + const char *cptr = gAnimLibrary.animStateToString(id); + if (cptr) + return std::string(cptr); + else + return std::string("[") + id.asString() + std::string("]"); +} + // Animation states that the user can trigger as part of a gesture // See struct LLAnimStateEntry in header for label location information const LLAnimStateEntry gUserAnimStates[] = { @@ -489,14 +498,5 @@ const LLAnimStateEntry gUserAnimStates[] = { const S32 gUserAnimStatesCount = LL_ARRAY_SIZE(gUserAnimStates); -std::string animationName( const LLUUID& id ) -{ - const char *cptr = gAnimLibrary.animStateToString(id); - if (cptr) - return std::string(cptr); - else - return std::string("[") + id.asString() + std::string("]"); -} - // End diff --git a/indra/llcharacter/llanimationstates.h b/indra/llcharacter/llanimationstates.h index 8b6052e0f0..59d3a7d789 100644 --- a/indra/llcharacter/llanimationstates.h +++ b/indra/llcharacter/llanimationstates.h @@ -232,6 +232,11 @@ public: // Associate an anim state with a name //----------------------------------------------------------------------------- void animStateSetString( const LLUUID& state, const std::string& name); + + //----------------------------------------------------------------------------- + // Find the name for a given animation, or UUID string if none defined. + //----------------------------------------------------------------------------- + std::string animationName( const LLUUID& id ) const; }; struct LLAnimStateEntry @@ -257,8 +262,6 @@ extern const LLAnimStateEntry gUserAnimStates[]; extern const S32 gUserAnimStatesCount; extern LLAnimationLibrary gAnimLibrary; -std::string animationName( const LLUUID& id ); - #endif // LL_LLANIMATIONSTATES_H diff --git a/indra/llcharacter/llkeyframewalkmotion.cpp b/indra/llcharacter/llkeyframewalkmotion.cpp index 561b26c022..f814618fc1 100644 --- a/indra/llcharacter/llkeyframewalkmotion.cpp +++ b/indra/llcharacter/llkeyframewalkmotion.cpp @@ -341,7 +341,7 @@ BOOL LLWalkAdjustMotion::onUpdate(F32 time, U8* joint_mask) mCharacter->setAnimationData("Walk Speed", &mAnimSpeed); if (mCharacter->getMotionController().mIsSelf) { - F32 elapsed = mCharacter->getMotionController().getFrameTimer().getElapsedTimeF32(); +// F32 elapsed = mCharacter->getMotionController().getFrameTimer().getElapsedTimeF32(); // llinfos << "PLOT elapsed: " << elapsed // << " footSlipVelocity: " << footSlipVelocity // << " mAvgCorrection: " << mAvgCorrection diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp index 04524dc015..78d9398c1d 100644 --- a/indra/llcharacter/llmotioncontroller.cpp +++ b/indra/llcharacter/llmotioncontroller.cpp @@ -1054,7 +1054,7 @@ void LLMotionController::dumpMotions() state_string += std::string("A"); if (mDeprecatedMotions.find(motion) != mDeprecatedMotions.end()) state_string += std::string("D"); - llinfos << animationName(id) << " " << state_string << llendl; + llinfos << gAnimLibrary.animationName(id) << " " << state_string << llendl; } } |