diff options
| author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-02-03 16:52:27 -0500 |
|---|---|---|
| committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-02-03 16:52:27 -0500 |
| commit | f8ee9ffce6f53427b35d344a290deb6efa467463 (patch) | |
| tree | 75e92e7e116f4d471f4d3cc26787756784babad2 /indra/llcharacter/lljoint.cpp | |
| parent | ef02c9ea694a1f0ddc830a66f23555c6316afdc7 (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/lljoint.cpp')
| -rwxr-xr-x | indra/llcharacter/lljoint.cpp | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp index a43e13aaa2..af50a3f574 100755 --- a/indra/llcharacter/lljoint.cpp +++ b/indra/llcharacter/lljoint.cpp @@ -121,20 +121,12 @@ LLJoint::LLJoint() : touch(); } -LLJoint::LLJoint(S32 joint_num) : - mJointNum(joint_num) -{ - init(); - touch(); -} - - //----------------------------------------------------------------------------- // LLJoint() // Class Constructor //----------------------------------------------------------------------------- LLJoint::LLJoint(const std::string &name, LLJoint *parent) : - mJointNum(0) + mJointNum(-2) { init(); mUpdateXform = FALSE; @@ -220,6 +212,18 @@ void LLJoint::touch(U32 flags) } //----------------------------------------------------------------------------- +// setJointNum() +//----------------------------------------------------------------------------- +void LLJoint::setJointNum(S32 joint_num) +{ + mJointNum = joint_num; + if (mJointNum + 2 >= LL_CHARACTER_MAX_ANIMATED_JOINTS) + { + LL_INFOS() << "Does LL_CHARACTER_MAX_ANIMATED_JOINTS need to be increased?" << LL_ENDL; + LL_ERRS() << "joint_num " << joint_num << " too large for " << LL_CHARACTER_MAX_ANIMATED_JOINTS << LL_ENDL; + } +} +//----------------------------------------------------------------------------- // getRoot() //----------------------------------------------------------------------------- LLJoint *LLJoint::getRoot() |
