From b625f9cd9956d135760da0053e46cf01692779c5 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 16 Nov 2017 20:33:11 +0000 Subject: SL-763 - disabling the use_quantum optimization in LLMotionController until it can be fixed. --- indra/llcharacter/llmotioncontroller.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/llcharacter/llmotioncontroller.cpp') diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp index 35e76f1d9d..bd23859bcb 100644 --- a/indra/llcharacter/llmotioncontroller.cpp +++ b/indra/llcharacter/llmotioncontroller.cpp @@ -814,7 +814,11 @@ void LLMotionController::updateLoadingMotions() //----------------------------------------------------------------------------- void LLMotionController::updateMotions(bool force_update) { - BOOL use_quantum = (mTimeStep != 0.f); + // 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; // Always update mPrevTimerElapsed F32 cur_time = mTimer.getElapsedTimeF32(); -- cgit v1.3 From 1fd5d03847437e96fa6b5a08e08e36cb218f990f Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 17 Nov 2017 11:48:58 +0000 Subject: 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(-) (limited to 'indra/llcharacter/llmotioncontroller.cpp') diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp index bd23859bcb..4c3a676382 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 1eddf92df9..8e24962b11 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 ee3ecb2237..293c24ac4b 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(old_parent); - LLVOVolume *new_volp = dynamic_cast(new_parent); // AXON - depending on whether animated objects can be attached, // we may want to include or remove the isAvatar() check. -- cgit v1.3 From 2e6e6c434615b46b754b8198c867f77b0a6b92de Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 20 Dec 2017 16:26:17 +0000 Subject: MAINT-8104 - make pausing of wireframe updates a little smarter - waits for a couple of frames to make sure state is current before starting to skip LLRiggedVolume::update() --- indra/llcharacter/llmotioncontroller.cpp | 3 ++- indra/llcharacter/llmotioncontroller.h | 3 ++- indra/newview/llvovolume.cpp | 8 +++++++- 3 files changed, 11 insertions(+), 3 deletions(-) (limited to 'indra/llcharacter/llmotioncontroller.cpp') diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp index 4c3a676382..3116403616 100644 --- a/indra/llcharacter/llmotioncontroller.cpp +++ b/indra/llcharacter/llmotioncontroller.cpp @@ -135,7 +135,7 @@ LLMotionController::LLMotionController() mLastTime(0.0f), mHasRunOnce(FALSE), mPaused(FALSE), - mPauseTime(0.f), + mPausedFrame(0), mTimeStep(0.f), mTimeStepCount(0), mLastInterp(0.f), @@ -1129,6 +1129,7 @@ void LLMotionController::pauseAllMotions() { //LL_INFOS() << "Pausing animations..." << LL_ENDL; mPaused = TRUE; + mPausedFrame = LLFrameTimer::getFrameCount(); } } diff --git a/indra/llcharacter/llmotioncontroller.h b/indra/llcharacter/llmotioncontroller.h index bcd0bfc685..637ee4d2bb 100644 --- a/indra/llcharacter/llmotioncontroller.h +++ b/indra/llcharacter/llmotioncontroller.h @@ -148,6 +148,7 @@ public: void pauseAllMotions(); void unpauseAllMotions(); BOOL isPaused() const { return mPaused; } + S32 getPausedFrame() const { return mPausedFrame; } void setTimeStep(F32 step); F32 getTimeStep() const { return mTimeStep; } @@ -221,7 +222,7 @@ protected: F32 mLastTime; BOOL mHasRunOnce; BOOL mPaused; - F32 mPauseTime; + S32 mPausedFrame; F32 mTimeStep; S32 mTimeStepCount; F32 mLastInterp; diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index d31cd1e33f..e291416f92 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -4409,11 +4409,17 @@ void LLRiggedVolume::update(const LLMeshSkinInfo* skin, LLVOAvatar* avatar, cons } else { +#if 1 bool is_paused = avatar && avatar->areAnimationsPaused(); if (is_paused) { - return; + S32 frames_paused = LLFrameTimer::getFrameCount() - avatar->getMotionController().getPausedFrame(); + if (frames_paused > 2) + { + return; + } } +#endif } -- cgit v1.3 From 2c81ace766546da0ea11efd4fa27cf1717eb5411 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 28 Sep 2018 19:13:17 +0100 Subject: SL-1290 - stop animations immediately if avatar is paused --- indra/llcharacter/llmotioncontroller.cpp | 3 ++- indra/newview/llvovolume.cpp | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'indra/llcharacter/llmotioncontroller.cpp') diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp index 3116403616..c48d02b652 100644 --- a/indra/llcharacter/llmotioncontroller.cpp +++ b/indra/llcharacter/llmotioncontroller.cpp @@ -441,7 +441,8 @@ BOOL LLMotionController::stopMotionLocally(const LLUUID &id, BOOL stop_immediate { // if already inactive, return false LLMotion *motion = findMotion(id); - return stopMotionInstance(motion, stop_immediate); + // SL-1290: always stop immediate if paused + return stopMotionInstance(motion, stop_immediate||mPaused); } BOOL LLMotionController::stopMotionInstance(LLMotion* motion, BOOL stop_immediate) diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 913460b3d1..192307dc8b 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -4726,7 +4726,6 @@ void LLRiggedVolume::update(const LLMeshSkinInfo* skin, LLVOAvatar* avatar, cons } else { -#if 1 bool is_paused = avatar && avatar->areAnimationsPaused(); if (is_paused) { @@ -4736,7 +4735,6 @@ void LLRiggedVolume::update(const LLMeshSkinInfo* skin, LLVOAvatar* avatar, cons return; } } -#endif } -- cgit v1.3