From 30880e062afa0671b166f161ae7c109bfd37d38f Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Fri, 21 Jul 2017 20:01:40 +0100
Subject: SL-751, SL-691 - test lsl scripts update, better syncing between
 skeleton and drawable

---
 indra/newview/lldrawable.cpp     | 6 ++++++
 indra/newview/llviewerobject.cpp | 4 ----
 2 files changed, 6 insertions(+), 4 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index 61ebf947dd..8001486b53 100644
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -50,6 +50,7 @@
 #include "llviewerobjectlist.h"
 #include "llviewerwindow.h"
 #include "llvocache.h"
+#include "llcontrolavatar.h"
 
 const F32 MIN_INTERPOLATE_DISTANCE_SQUARED = 0.001f * 0.001f;
 const F32 MAX_INTERPOLATE_DISTANCE_SQUARED = 10.f * 10.f;
@@ -697,6 +698,11 @@ F32 LLDrawable::updateXform(BOOL undamped)
 	mXform.setScale(LLVector3(1,1,1)); //no scale in drawable transforms (IT'S A RULE!)
 	mXform.updateMatrix();
 
+    if (mVObjp && mVObjp->isRootEdit() && mVObjp->getControlAvatar())
+    {
+        mVObjp->getControlAvatar()->matchVolumeTransform();
+    }
+    
 	if (mSpatialBridge)
 	{
 		gPipeline.markMoved(mSpatialBridge, FALSE);
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index cb9f9e0455..e2fbac023a 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -4062,10 +4062,6 @@ void LLViewerObject::setPosition(const LLVector3 &pos, BOOL damped)
 		// position caches need to be up to date on root objects
 		updatePositionCaches();
 	}
-    if (getControlAvatar() && isRootEdit())
-    {
-        getControlAvatar()->matchVolumeTransform();
-    }
 }
 
 void LLViewerObject::setPositionGlobal(const LLVector3d &pos_global, BOOL damped)
-- 
cgit v1.2.3