From c6fe446c3a047fd7e7841d960f35369ec957b9cc Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Mon, 16 May 2022 23:21:50 +0300
Subject: SL-17415 Movement of scripted attached objects is no longer
 interpolated.

---
 indra/newview/llvoavatar.cpp | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index ccb1662139..701a0b5b13 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -2847,9 +2847,17 @@ void LLVOAvatar::idleUpdateMisc(bool detailed_update)
                         }
                     }
 
-                    
-                    attached_object->mDrawable->makeActive();
-                    attached_object->mDrawable->updateXform(TRUE);
+                    // if selecting any attachments, update all of them as non-damped
+                    if (LLSelectMgr::getInstance()->getSelection()->getObjectCount() && LLSelectMgr::getInstance()->getSelection()->isAttachment())
+                    {
+                        gPipeline.updateMoveNormalAsync(attached_object->mDrawable);
+                    }
+                    else
+                    {
+                        // Note: SL-17415; While most objects follow joints,
+                        // some objects get position updates from server
+                        gPipeline.updateMoveDampedAsync(attached_object->mDrawable);
+                    }
 
                     // override_bbox calls movePartition() and getSpatialPartition(),
                     // so bridge might no longer be valid, get it again.
-- 
cgit v1.2.3