diff options
| author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2017-10-04 21:15:49 +0100 | 
|---|---|---|
| committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2017-10-04 21:15:49 +0100 | 
| commit | 5cbb440344b54388b5d9f73270f38bba8666d27f (patch) | |
| tree | c84b1dda8ce1201b67ca9c4dab8e6794041ef7ee | |
| parent | 20b7f4684c8182a02422160ad3c5b6102dc8f997 (diff) | |
SL-811 - make reset skeleton logic smarter. Should fix this bug and also allow animesh skeletons to be reset, although there's no way currently to exercise the latter capability.
| -rw-r--r-- | indra/newview/llvoavatar.cpp | 22 | 
1 files changed, 20 insertions, 2 deletions
| diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 516cf79fbe..874f20afe4 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5699,7 +5699,18 @@ void LLVOAvatar::rebuildAttachmentOverrides()  {      LLScopedContextString str("rebuildAttachmentOverrides " + getFullname()); -    // Attachment points +    // Handle the case that we're resetting the skeleton of an animated object. +    LLControlAvatar *control_av = dynamic_cast<LLControlAvatar*>(this); +    if (control_av) +    { +        LLVOVolume *volp = control_av->mRootVolp; +        if (volp) +        { +            addAttachmentOverridesForObject(volp); +        } +    } + +    // Attached objects  	for (attachment_map_t::iterator iter = mAttachmentPoints.begin();  		 iter != mAttachmentPoints.end();  		 ++iter) @@ -5710,11 +5721,18 @@ void LLVOAvatar::rebuildAttachmentOverrides()              for (LLViewerJointAttachment::attachedobjs_vec_t::iterator at_it = attachment_pt->mAttachedObjects.begin();  				 at_it != attachment_pt->mAttachedObjects.end(); ++at_it)              { -                addAttachmentOverridesForObject(*at_it); +                LLViewerObject *vo = *at_it; +                // Attached animated objects affect joints in their control +                // avs, not the avs to which they are attached. +                if (!vo->isAnimatedObject()) +                { +                    addAttachmentOverridesForObject(vo); +                }              }          }      }  } +  //-----------------------------------------------------------------------------  // addAttachmentPosOverridesForObject  //----------------------------------------------------------------------------- | 
