summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2017-09-06 17:38:56 +0300
committerandreykproductengine <andreykproductengine@lindenlab.com>2017-09-06 17:38:56 +0300
commitf6655bd2ae4aca0fa309ee1fdbcc515d6606b949 (patch)
tree210c5f7267c66b987c6d9a2ee0fc20d06e05a31c
parent9225439043ed805f6eeb0ed8e69000af5bcec226 (diff)
Backed out changeset: ab07c3c8d1ea (MAINT-5013)
-rw-r--r--indra/newview/llvoavatar.cpp15
-rw-r--r--indra/newview/llvoavatar.h2
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);