From 2f209465dc1adc33b2135d685a88190e83952012 Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Fri, 4 May 2018 15:04:42 +0100
Subject: [PATCH] MAINT-8608 - more on animation updates

---
 indra/newview/llcontrolavatar.cpp | 2 ++
 indra/newview/llviewerobject.cpp  | 6 +++++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/indra/newview/llcontrolavatar.cpp b/indra/newview/llcontrolavatar.cpp
index f298a8884b5..c977f3784f7 100644
--- a/indra/newview/llcontrolavatar.cpp
+++ b/indra/newview/llcontrolavatar.cpp
@@ -367,6 +367,7 @@ void LLControlAvatar::updateAnimations()
     for (std::vector<LLVOVolume*>::iterator vol_it = volumes.begin(); vol_it != volumes.end(); ++vol_it)
     {
         LLVOVolume *volp = *vol_it;
+        LL_INFOS("AnimatedObjects") << "updating anim for vol " << volp->getID() << " root " << mRootVolp->getID() << LL_ENDL;
         signaled_animation_map_t& signaled_animations = LLObjectSignaledAnimationMap::instance().getMap()[volp->getID()];
         for (std::map<LLUUID,S32>::iterator anim_it = signaled_animations.begin();
              anim_it != signaled_animations.end();
@@ -383,6 +384,7 @@ void LLControlAvatar::updateAnimations()
                 // Animation not already present, use this sequence id.
                 anims[anim_it->first] = anim_it->second;
             }
+            LL_INFOS("AnimatedObjects") << "found anim for vol " << volp->getID() << " anim " << anim_it->first << " root " << mRootVolp->getID() << LL_ENDL;
         }
     }
     if (!mPlaying)
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 166fc04ad00..725f48f0916 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -2993,6 +2993,10 @@ void LLViewerObject::updateControlAvatar()
         LL_DEBUGS("AnimatedObjects") << vobj_name << " calling unlinkControlAvatar()" << LL_ENDL;
         root->unlinkControlAvatar();
     }
+    if (getControlAvatar())
+    {
+        getControlAvatar()->updateAnimations();
+    }
 }
 
 void LLViewerObject::linkControlAvatar()
@@ -3024,7 +3028,7 @@ void LLViewerObject::linkControlAvatar()
                 cav->mRootVolp->recursiveMarkForUpdate(TRUE);
             }
         }
-        cav->updateAnimations();
+        //cav->updateAnimations();
     }
     else
     {
-- 
GitLab