summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rwxr-xr-xindra/newview/llvoavatar.cpp12
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);
}
}