diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llvoavatar.cpp | 15 | ||||
-rw-r--r-- | indra/newview/llvoavatar.h | 2 |
2 files changed, 6 insertions, 11 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 1658adea08..398b33b5ab 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5260,13 +5260,13 @@ void LLVOAvatar::resetAnimations() // Override selectively based on avatar sex and whether we're using new // animations. -LLUUID LLVOAvatar::remapMotionID(const LLUUID& id, ESex gender) +LLUUID LLVOAvatar::remapMotionID(const LLUUID& id) { BOOL use_new_walk_run = gSavedSettings.getBOOL("UseNewWalkRun"); LLUUID result = id; // start special case female walk for female avatars - if (gender == SEX_FEMALE) + if (getSex() == SEX_FEMALE) { if (id == ANIM_AGENT_WALK) { @@ -5316,7 +5316,7 @@ BOOL LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset) { LL_DEBUGS() << "motion requested " << id.asString() << " " << gAnimLibrary.animationName(id) << LL_ENDL; - LLUUID remap_id = remapMotionID(id, getSex()); + LLUUID remap_id = remapMotionID(id); if (remap_id != id) { @@ -5338,13 +5338,8 @@ BOOL LLVOAvatar::stopMotion(const LLUUID& id, BOOL stop_immediate) { LL_DEBUGS() << "motion requested " << id.asString() << " " << gAnimLibrary.animationName(id) << LL_ENDL; - LLUUID remap_id = remapMotionID(id, getSex()); - if (findMotion(remap_id) == NULL) - { - //possibility of encountering animation from the previous gender - remap_id = remapMotionID(id, (getSex() == SEX_MALE) ? SEX_FEMALE : SEX_MALE); - } - + LLUUID remap_id = remapMotionID(id); + if (remap_id != id) { LL_DEBUGS() << "motion resultant " << remap_id.asString() << " " << gAnimLibrary.animationName(remap_id) << LL_ENDL; diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 253d9c24f3..bd89d4ef23 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -188,7 +188,7 @@ public: /*virtual*/ LLVector3 getCharacterVelocity(); /*virtual*/ LLVector3 getCharacterAngularVelocity(); - /*virtual*/ LLUUID remapMotionID(const LLUUID& id, ESex gender); + /*virtual*/ LLUUID remapMotionID(const LLUUID& id); /*virtual*/ BOOL startMotion(const LLUUID& id, F32 time_offset = 0.f); /*virtual*/ BOOL stopMotion(const LLUUID& id, BOOL stop_immediate = FALSE); virtual bool hasMotionFromSource(const LLUUID& source_id); |