summaryrefslogtreecommitdiff
path: root/indra/llcharacter/llkeyframemotion.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2016-02-03 16:52:27 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2016-02-03 16:52:27 -0500
commitf8ee9ffce6f53427b35d344a290deb6efa467463 (patch)
tree75e92e7e116f4d471f4d3cc26787756784babad2 /indra/llcharacter/llkeyframemotion.cpp
parentef02c9ea694a1f0ddc830a66f23555c6316afdc7 (diff)
SL-333 work - attachment joints now get a valid mJointNum, more checking on valid joint num values. Also reduced log spam slightly.
Diffstat (limited to 'indra/llcharacter/llkeyframemotion.cpp')
-rwxr-xr-xindra/llcharacter/llkeyframemotion.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp
index 33d3a7146b..0ab716d092 100755
--- a/indra/llcharacter/llkeyframemotion.cpp
+++ b/indra/llcharacter/llkeyframemotion.cpp
@@ -1380,7 +1380,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
LL_WARNS() << "no joints in animation" << LL_ENDL;
return FALSE;
}
- else if (num_motions > LL_CHARACTER_MAX_JOINTS)
+ else if (num_motions > LL_CHARACTER_MAX_ANIMATED_JOINTS)
{
LL_WARNS() << "too many joints in animation" << LL_ENDL;
return FALSE;
@@ -1419,7 +1419,14 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
LLJoint *joint = mCharacter->getJoint( joint_name );
if (joint)
{
+ S32 joint_num = joint->getJointNum();
// LL_INFOS() << " joint: " << joint_name << LL_ENDL;
+ if ((joint_num >= (S32)LL_CHARACTER_MAX_ANIMATED_JOINTS) || (joint_num < 0))
+ {
+ LL_WARNS() << "Joint will be omitted from animation: joint_num " << joint_num << " is outside of legal range [0-"
+ << LL_CHARACTER_MAX_ANIMATED_JOINTS << ") for joint " << joint->getName() << LL_ENDL;
+ joint = NULL;
+ }
}
else
{