diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2015-08-12 15:23:57 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2015-08-12 15:23:57 -0400 |
commit | 590d0e35e542fe3d973e5a67e1a7db34c0429701 (patch) | |
tree | bc654330d4ba6e4a0bfd28e6378854f275a80879 /indra/newview/llvoavatar.cpp | |
parent | 932412e1dbc2d684970a1398e140f7d2757e0440 (diff) |
SL-109 WIP - brought over work from SL-125 repo that was not dynamic skeleton related
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rwxr-xr-x | indra/newview/llvoavatar.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index f753448770..253271322c 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5435,8 +5435,14 @@ BOOL LLVOAvatar::loadSkeletonNode () LLViewerJointAttachment* attachment = new LLViewerJointAttachment(); attachment->setName(info->mName); - LLJoint *parentJoint = getJoint(info->mJointName); - if (!parentJoint) + LLJoint *parent_joint = getJoint(info->mJointName); + if (!parent_joint) + { + // If the intended location for attachment point is unavailable, stick it in a default location. + LL_INFOS() << "attachment pt " << info->mName << " using mPelvis as default parent" << LL_ENDL; + parent_joint = getJoint("mPelvis"); + } + if (!parent_joint) { LL_WARNS() << "No parent joint by name " << info->mJointName << " found for attachment point " << info->mName << LL_ENDL; delete attachment; @@ -5491,7 +5497,7 @@ BOOL LLVOAvatar::loadSkeletonNode () mAttachmentPoints[attachmentID] = attachment; // now add attachment joint - parentJoint->addChild(attachment); + parent_joint->addChild(attachment); } } |