diff --git a/indra/llcharacter/llanimationstates.cpp b/indra/llcharacter/llanimationstates.cpp index 879f97deeced1cc226a652debf619d0ad7779b1e..4c24218fc3f0bf5f586db656adcadca7d14cf0e8 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 8b6052e0f0ead271797e784e167c93ad74c9a7ef..59d3a7d789faee96cc0c84894172f031f9acbb4b 100644 --- a/indra/llcharacter/llanimationstates.h +++ b/indra/llcharacter/llanimationstates.h @@ -232,6 +232,11 @@ class LLAnimationLibrary // 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 561b26c0221e4e901c1a8fcbe44f22d20790697e..f814618fc180e968b419f62884ea28cec800e0ac 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 04524dc015d510499e70755ae182848aa831626a..78d9398c1d0a6648c24407146033eceb498edb54 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; } } diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 278bec1927b3eb64b17f898000e17d2cc1af9fd9..94fef1c7e5375e154e5c329d39073f658dea4078 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2191,7 +2191,7 @@ void LLVOAvatar::dumpAnimationState() { playtag = "*"; } - llinfos << animationName(id) << playtag << llendl; + llinfos << gAnimLibrary.animationName(id) << playtag << llendl; } for (LLVOAvatar::AnimIterator it = mPlayingAnimations.begin(); it != mPlayingAnimations.end(); ++it) { @@ -2199,7 +2199,7 @@ void LLVOAvatar::dumpAnimationState() bool is_signaled = mSignaledAnimations.find(id) != mSignaledAnimations.end(); if (!is_signaled) { - llinfos << animationName(id) << "!S" << llendl; + llinfos << gAnimLibrary.animationName(id) << "!S" << llendl; } } } @@ -4542,13 +4542,13 @@ BOOL LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset) { LLMemType mt(LLMemType::MTYPE_AVATAR); - lldebugs << "motion requested " << id.asString() << " " << animationName(id) << llendl; + lldebugs << "motion requested " << id.asString() << " " << gAnimLibrary.animationName(id) << llendl; LLUUID remap_id = remapMotionID(id); if (remap_id != id) { - lldebugs << "motion resultant " << remap_id.asString() << " " << animationName(remap_id) << llendl; + lldebugs << "motion resultant " << remap_id.asString() << " " << gAnimLibrary.animationName(remap_id) << llendl; } if (isSelf() && remap_id == ANIM_AGENT_AWAY) @@ -4564,18 +4564,17 @@ BOOL LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset) //----------------------------------------------------------------------------- BOOL LLVOAvatar::stopMotion(const LLUUID& id, BOOL stop_immediate) { - lldebugs << "motion requested " << id.asString() << " " << animationName(id) << llendl; + lldebugs << "motion requested " << id.asString() << " " << gAnimLibrary.animationName(id) << llendl; LLUUID remap_id = remapMotionID(id); if (remap_id != id) { - lldebugs << "motion resultant " << remap_id.asString() << " " << animationName(remap_id) << llendl; + lldebugs << "motion resultant " << remap_id.asString() << " " << gAnimLibrary.animationName(remap_id) << llendl; } if (isSelf()) { - // BAP - was onAnimStop(id) originally - verify fix. gAgent.onAnimStop(remap_id); }