From e2aa2e0008ff473346c1644f9dd094abce99218b Mon Sep 17 00:00:00 2001
From: ruslantproductengine <ruslantproductengine@lindenlab.com>
Date: Wed, 26 Apr 2017 15:56:43 +0300
Subject: [PATCH] MAINT-6275 - Child prim not touchable after being resized and
 moved relative to root prim by script.

FIXED.
UPDATED: Add comments.
---
 indra/newview/lldrawable.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index 0c47e0f0eef..6ca8f1ae9c3 100644
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -667,6 +667,7 @@ F32 LLDrawable::updateXform(BOOL undamped)
 		{
 			// snap to final position (only if no target omega is applied)
 			dist_squared = 0.0f;
+			//set target scale here, because of dist_squared = 0.0f remove object from move list
 			mCurrentScale = target_scale;
 
 			if (getVOVolume() && !isRoot())
@@ -686,6 +687,11 @@ F32 LLDrawable::updateXform(BOOL undamped)
 	}
 
 	const LLVector3 vec = mCurrentScale-target_scale;
+	
+	//It's a very important on each cycle on Drawable::update form(), when object remained in move
+	//, list update the CurrentScale member, because if do not do that, it remained in this list forever 
+	//or when the delta time between two frames a become a sufficiently large (due to interpolation) 
+	//for overcome the MIN_INTERPOLATE_DISTANCE_SQUARED.
 	mCurrentScale = target_scale;
 	
 	if (vec*vec > MIN_INTERPOLATE_DISTANCE_SQUARED)
-- 
GitLab