diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index fdce66e2c6941a1542cc9450bdc673da1605213b..0fcb4ffc557f1f61743a5d4a0dc717876a78f4ab 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5717,7 +5717,7 @@ void LLVOAvatar::rebuildAttachmentOverrides() //----------------------------------------------------------------------------- void LLVOAvatar::addAttachmentOverridesForObject(LLViewerObject *vo) { - if (vo->getAvatar() != this) + if (vo->getAvatar() != this && vo->getAvatarAncestor() != this) { LL_WARNS("Avatar") << "called with invalid avatar" << LL_ENDL; return; @@ -5936,7 +5936,7 @@ void LLVOAvatar::showAttachmentOverrides(bool verbose) const // AXON handle NPC case void LLVOAvatar::removeAttachmentOverridesForObject(LLViewerObject *vo) { - if (vo->getAvatar() != this) + if (vo->getAvatar() != this && vo->getAvatarAncestor() != this) { LL_WARNS("Avatar") << "called with invalid avatar" << LL_ENDL; return; diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index e8122c07486316f89b5504376fbd9b19cc235bc9..121fb9c11e9ed6222bb5ee5970d034b1125731bd 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -3348,6 +3348,11 @@ void LLVOVolume::setExtendedMeshFlags(U32 flags) // Making a rigged mesh into an animated object getAvatarAncestor()->removeAttachmentOverridesForObject(this); } + else + { + // Making an animated object into a rigged mesh + getAvatarAncestor()->addAttachmentOverridesForObject(this); + } } } }