From a6131b5652124d40e782dd6bc653a9020061cf33 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Thu, 8 Aug 2024 22:13:57 +0200 Subject: #2229 BugSplat Crash #1502471: SecondLifeViewer!LLPolySkeletalDistortion::apply(196) --- indra/newview/llvoavatar.cpp | 23 ++++------------------- indra/newview/llvoavatar.h | 2 +- 2 files changed, 5 insertions(+), 20 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index b3b8969faa..f813df3fb5 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -3081,30 +3081,15 @@ void LLVOAvatar::idleUpdateAppearanceAnimation() } else { - F32 morph_amt = calcMorphAmount(); - LLVisualParam *param; - if (!isSelf()) { + F32 morph_amt = calcMorphAmount(); // animate only top level params for non-self avatars - for (param = getFirstVisualParam(); - param; - param = getNextVisualParam()) - { - if (param->isTweakable()) - { - param->animate(morph_amt); - } - } + animateTweakableVisualParams(morph_amt); } // apply all params - for (param = getFirstVisualParam(); - param; - param = getNextVisualParam()) - { - param->apply(avatar_sex); - } + applyAllVisualParams(avatar_sex); mLastAppearanceBlendTime = appearance_anim_time; } @@ -3112,7 +3097,7 @@ void LLVOAvatar::idleUpdateAppearanceAnimation() } } -F32 LLVOAvatar::calcMorphAmount() +F32 LLVOAvatar::calcMorphAmount() const { F32 appearance_anim_time = mAppearanceMorphTimer.getElapsedTimeF32(); F32 blend_frac = calc_bouncy_animation(appearance_anim_time / APPEARANCE_MORPH_TIME); diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 2144be1ba5..aa6aee0de5 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -422,7 +422,7 @@ protected: bool updateIsFullyLoaded(); bool processFullyLoadedChange(bool loading); void updateRuthTimer(bool loading); - F32 calcMorphAmount(); + F32 calcMorphAmount() const; private: bool mFirstFullyVisible; -- cgit v1.2.3