summaryrefslogtreecommitdiff
path: root/indra/llcharacter/llmotion.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/llmotion.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/llmotion.cpp')
-rwxr-xr-xindra/llcharacter/llmotion.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/indra/llcharacter/llmotion.cpp b/indra/llcharacter/llmotion.cpp
index 82def47ddb..697efc8157 100755
--- a/indra/llcharacter/llmotion.cpp
+++ b/indra/llcharacter/llmotion.cpp
@@ -55,7 +55,7 @@ LLMotion::LLMotion( const LLUUID &id ) :
mDeactivateCallbackUserData(NULL)
{
for (S32 i=0; i<3; ++i)
- memset(&mJointSignature[i][0], 0, sizeof(U8) * LL_CHARACTER_MAX_JOINTS);
+ memset(&mJointSignature[i][0], 0, sizeof(U8) * LL_CHARACTER_MAX_ANIMATED_JOINTS);
}
//-----------------------------------------------------------------------------
@@ -112,9 +112,10 @@ void LLMotion::addJointState(const LLPointer<LLJointState>& jointState)
// for now, usage is everything
S32 joint_num = jointState->getJoint()->getJointNum();
- if ((joint_num >= (S32)LL_CHARACTER_MAX_JOINTS) || (joint_num < 0))
+ if ((joint_num >= (S32)LL_CHARACTER_MAX_ANIMATED_JOINTS) || (joint_num < 0))
{
- LL_WARNS() << "joint_num " << joint_num << " is outside of legal range [0-" << LL_CHARACTER_MAX_JOINTS << ") for joint " << jointState->getJoint()->getName() << LL_ENDL;
+ LL_WARNS() << "joint_num " << joint_num << " is outside of legal range [0-" << LL_CHARACTER_MAX_ANIMATED_JOINTS << ") for joint " << jointState->getJoint()->getName() << LL_ENDL;
+ return;
}
mJointSignature[0][joint_num] = (usage & LLJointState::POS) ? (0xff >> (7 - priority)) : 0;
mJointSignature[1][joint_num] = (usage & LLJointState::ROT) ? (0xff >> (7 - priority)) : 0;