diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2017-06-19 20:44:04 +0100 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2017-06-19 20:44:04 +0100 |
commit | e0d6a6a40192caa5b9d62165da5f23a5ade6e4b0 (patch) | |
tree | 3e204e1da2187355b98f4cc51077b98ab24340d7 /indra/newview/llvoavatar.cpp | |
parent | b2a06578187af5446b5e24379abc8764f0cd731f (diff) |
SL-725 - suppress default animations for LLControlAvatar, using a new mEnableDefaultAnimations field
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r-- | indra/newview/llvoavatar.cpp | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 1c9f79b200..c1331bf521 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -665,7 +665,8 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, mLastUpdateReceivedCOFVersion(-1), mCachedMuteListUpdateTime(0), mCachedInMuteList(false), - mIsControlAvatar(false) + mIsControlAvatar(false), + mEnableDefaultMotions(true) { LL_DEBUGS("AvatarRender") << "LLVOAvatar Constructor (0x" << this << ") id:" << mID << LL_ENDL; @@ -1798,7 +1799,11 @@ void LLVOAvatar::buildCharacter() mAahMorph = getVisualParam( "Express_Open_Mouth" ); } - startDefaultMotions(); + // Currently disabled for control avatars (animated objects), enabled for all others. + if (mEnableDefaultMotions) + { + startDefaultMotions(); + } //------------------------------------------------------------------------- // restart any currently active motions @@ -3411,6 +3416,7 @@ void LLVOAvatar::updateDebugText() addDebugText(mBakedTextureDebugText); } + // Develop -> Avatar -> Animation Info if (LLVOAvatar::sShowAnimationDebug) { for (LLMotionController::motion_list_t::iterator iter = mMotionController.getActiveMotions().begin(); @@ -5042,7 +5048,10 @@ void LLVOAvatar::processAnimationStateChanges() else if (mInAir && !mIsSitting) { stopMotion(ANIM_AGENT_WALK_ADJUST); - startMotion(ANIM_AGENT_FLY_ADJUST); + if (mEnableDefaultMotions) + { + startMotion(ANIM_AGENT_FLY_ADJUST); + } } else { @@ -5052,13 +5061,19 @@ void LLVOAvatar::processAnimationStateChanges() if ( isAnyAnimationSignaled(AGENT_GUN_AIM_ANIMS, NUM_AGENT_GUN_AIM_ANIMS) ) { - startMotion(ANIM_AGENT_TARGET); + if (mEnableDefaultMotions) + { + startMotion(ANIM_AGENT_TARGET); + } stopMotion(ANIM_AGENT_BODY_NOISE); } else { stopMotion(ANIM_AGENT_TARGET); - startMotion(ANIM_AGENT_BODY_NOISE); + if (mEnableDefaultMotions) + { + startMotion(ANIM_AGENT_BODY_NOISE); + } } // clear all current animations @@ -6670,7 +6685,10 @@ void LLVOAvatar::getOffObject() mRoot->setRotation(cur_rotation_world); mRoot->getXform()->update(); - startMotion(ANIM_AGENT_BODY_NOISE); + if (mEnableDefaultMotions) + { + startMotion(ANIM_AGENT_BODY_NOISE); + } if (isSelf()) { |