From c5433f1836449e7599bdfcd352ce94eacf19d2dc Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 7 Jul 2022 22:59:34 +0300 Subject: [PATCH] SL-16598 Stuck in Ground Sit 'Sitting' motion was in a loading state, but not active, which resulted in viewer dropping 'sitting' state --- indra/newview/llvoavatar.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 25351fe5be..c332d64589 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5287,7 +5287,12 @@ bool LLVOAvatar::updateCharacter(LLAgent &agent) } else if (!getParent() && isSitting() && !isMotionActive(ANIM_AGENT_SIT_GROUND_CONSTRAINED)) { - getOffObject(); + // If we are starting up, motion might be loading + LLMotion *motionp = mMotionController.findMotion(ANIM_AGENT_SIT_GROUND_CONSTRAINED); + if (!motionp || !mMotionController.isMotionLoading(motionp)) + { + getOffObject(); + } } //--------------------------------------------------------------------