diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2018-12-07 21:27:12 +0000 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2022-05-18 23:25:51 +0300 |
commit | f7edcab9c3187a2dc797db614ba0302ed7eed578 (patch) | |
tree | 7fec7cf780e599c481beff24f276ef0417783e32 /indra/newview/llvoavatar.cpp | |
parent | d35f4536cc667ea1c2c0ade08c697d2b9e6f269c (diff) |
SL-288, SL-10163 - allow joint aliases, but otherwise reject upload of animations containing invalid joint names
# Conflicts:
# indra/newview/llviewerassetupload.cpp
# indra/newview/llvoavatar.cpp
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r-- | indra/newview/llvoavatar.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index d421b3b1f6..487730e209 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -6145,8 +6145,17 @@ LLJoint *LLVOAvatar::getJoint( const std::string &name ) LLJoint* jointp = NULL; if (iter == mJointMap.end() || iter->second == NULL) - { //search for joint and cache found joint in lookup table - jointp = mRoot->findJoint(name); + joint_alias_map_t::const_iterator alias_iter = mJointAliasMap.find(name); + std::string canonical_name; + if (alias_iter != mJointAliasMap.end()) + { + canonical_name = alias_iter->second; + } + else + { + canonical_name = name; + } + jointp = mRoot->findJoint(canonical_name); mJointMap[name] = jointp; } else |