From 2851793e670bbdff79f97534206bd3d7b4ae003d Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 26 Sep 2017 15:39:22 +0100 Subject: SL-800 - also need to add attachment overrides in the complementary case --- indra/newview/llvoavatar.cpp | 4 ++-- indra/newview/llvovolume.cpp | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index fdce66e2c6..0fcb4ffc55 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 e8122c0748..121fb9c11e 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); + } } } } -- cgit v1.2.3