diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2020-05-11 13:29:09 +0100 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2020-05-11 13:29:09 +0100 |
commit | b2ce0b49a02df04678ac997bd8633ec2477754e8 (patch) | |
tree | 57c1f53244a80609fa21817fc4c86be6f9695896 /indra/newview/llvoavatar.cpp | |
parent | fbd5f63f470e3cea5039b929690c9e28a137c244 (diff) |
SL-13000 - animation management with jellydolled state
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r-- | indra/newview/llvoavatar.cpp | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index d2e003442d..a56862718f 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2074,11 +2074,14 @@ void LLVOAvatar::resetSkeleton(bool reset_animations) } // Reset tweakable params to preserved state - if (mLastProcessedAppearance) - { - bool slam_params = true; - applyParsedAppearanceMessage(*mLastProcessedAppearance, slam_params); - } + if (getOverallAppearance() == AOA_NORMAL) + { + if (mLastProcessedAppearance) + { + bool slam_params = true; + applyParsedAppearanceMessage(*mLastProcessedAppearance, slam_params); + } + } updateVisualParams(); // Restore attachment pos overrides @@ -5602,8 +5605,8 @@ void LLVOAvatar::processAnimationStateChanges() stopMotion(ANIM_AGENT_TARGET); if (mEnableDefaultMotions) { - startMotion(ANIM_AGENT_BODY_NOISE); - } + startMotion(ANIM_AGENT_BODY_NOISE); + } } // clear all current animations @@ -5623,6 +5626,12 @@ void LLVOAvatar::processAnimationStateChanges() ++anim_it; } + // if jellydolled, shelve all playing animations + if (getOverallAppearance() != AOA_NORMAL) + { + mPlayingAnimations.clear(); + } + // start up all new anims for (anim_it = mSignaledAnimations.begin(); anim_it != mSignaledAnimations.end();) { @@ -5631,11 +5640,14 @@ void LLVOAvatar::processAnimationStateChanges() // signaled but not playing, or different sequence id, start motion if (found_anim == mPlayingAnimations.end() || found_anim->second != anim_it->second) { - if (processSingleAnimationStateChange(anim_it->first, TRUE)) + if (getOverallAppearance() == AOA_NORMAL) { - mPlayingAnimations[anim_it->first] = anim_it->second; - ++anim_it; - continue; + if (processSingleAnimationStateChange(anim_it->first, TRUE)) + { + mPlayingAnimations[anim_it->first] = anim_it->second; + ++anim_it; + continue; + } } } |