From 1fd5d03847437e96fa6b5a08e08e36cb218f990f Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Fri, 17 Nov 2017 11:48:58 +0000
Subject: [PATCH] SL-763 - disabled in slightly different way, more comments

---
 indra/llcharacter/llmotioncontroller.cpp | 8 ++++----
 indra/newview/llvoavatar.cpp             | 4 ++--
 indra/newview/llvovolume.cpp             | 1 -
 3 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp
index bd23859bcbd..4c3a676382b 100644
--- a/indra/llcharacter/llmotioncontroller.cpp
+++ b/indra/llcharacter/llmotioncontroller.cpp
@@ -815,10 +815,10 @@ void LLMotionController::updateLoadingMotions()
 void LLMotionController::updateMotions(bool force_update)
 {
     // SL-763: "Distant animated objects run at super fast speed"
-    // The use_quantum optimization does not work as implemented.
-    // Disabling until such time as someone can do a deeper dive.
-	//BOOL use_quantum = (mTimeStep != 0.f);
-	BOOL use_quantum = FALSE;
+    // The use_quantum optimization or possibly the associated code in setTimeStamp()
+    // does not work as implemented.
+    // Currently setting mTimeStep to nonzero is disabled elsewhere.
+	BOOL use_quantum = (mTimeStep != 0.f);
 
 	// Always update mPrevTimerElapsed
 	F32 cur_time = mTimer.getElapsedTimeF32();
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 1eddf92df9b..8e24962b117 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -3903,7 +3903,6 @@ void LLVOAvatar::updateTimeStep()
         // fixed.
 		mMotionController.setTimeStep(time_step);
 	}
-
 }
 
 void LLVOAvatar::updateRootPositionAndRotation(LLAgent& agent, F32 speed, bool was_sit_ground_constrained) 
@@ -4093,7 +4092,8 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
 	// change animation time quanta based on avatar render load
     // AXON how should control avs be handled here?
 	//--------------------------------------------------------------------
-    updateTimeStep();
+    // SL-763 the time step quantization does not currently work.
+    //updateTimeStep();
     
 	//--------------------------------------------------------------------
     // Update sitting state based on parent and active animation info.
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index ee3ecb22379..293c24ac4b4 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -3439,7 +3439,6 @@ bool LLVOVolume::isAnimatedObject() const
 void LLVOVolume::updateAnimatedObjectStateOnReparent(LLViewerObject *old_parent, LLViewerObject *new_parent)
 {
     LLVOVolume *old_volp = dynamic_cast<LLVOVolume*>(old_parent);
-    LLVOVolume *new_volp = dynamic_cast<LLVOVolume*>(new_parent);
 
     // AXON - depending on whether animated objects can be attached,
     // we may want to include or remove the isAvatar() check.
-- 
GitLab