summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2017-06-19 20:44:04 +0100
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2017-06-19 20:44:04 +0100
commite0d6a6a40192caa5b9d62165da5f23a5ade6e4b0 (patch)
tree3e204e1da2187355b98f4cc51077b98ab24340d7 /indra
parentb2a06578187af5446b5e24379abc8764f0cd731f (diff)
SL-725 - suppress default animations for LLControlAvatar, using a new mEnableDefaultAnimations field
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llcontrolavatar.cpp4
-rw-r--r--indra/newview/llviewermessage.cpp1
-rw-r--r--indra/newview/llvoavatar.cpp30
-rw-r--r--indra/newview/llvoavatar.h5
4 files changed, 30 insertions, 10 deletions
diff --git a/indra/newview/llcontrolavatar.cpp b/indra/newview/llcontrolavatar.cpp
index 03a374ebdb..8027ea9c73 100644
--- a/indra/newview/llcontrolavatar.cpp
+++ b/indra/newview/llcontrolavatar.cpp
@@ -30,6 +30,7 @@
#include "llviewerobjectlist.h"
#include "pipeline.h"
#include "llanimationstates.h"
+#include "llviewercontrol.h"
LLControlAvatar::LLControlAvatar(const LLUUID& id, const LLPCode pcode, LLViewerRegion* regionp) :
LLVOAvatar(id, pcode, regionp),
@@ -37,6 +38,7 @@ LLControlAvatar::LLControlAvatar(const LLUUID& id, const LLPCode pcode, LLViewer
mGlobalScale(1.0f)
{
mIsControlAvatar = true;
+ mEnableDefaultMotions = false;
}
// virtual
@@ -150,7 +152,7 @@ LLControlAvatar *LLControlAvatar::createControlAvatar(LLVOVolume *obj)
cav->mSpecialRenderMode = 1;
cav->updateJointLODs();
cav->updateGeometry(cav->mDrawable);
- cav->startMotion(ANIM_AGENT_STAND, 5.0f);
+ //cav->startMotion(ANIM_AGENT_STAND, 5.0f);
cav->hideSkirt();
// stop extraneous animations
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index f359c1455f..df69d6d197 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -5113,7 +5113,6 @@ void process_object_animation(LLMessageSystem *mesgsys, void **user_data)
avatarp->updateGeom(volp);
}
avatarp->mSignaledAnimations.clear();
- volp->setDebugText(llformat("Animations %d", num_blocks));
for( S32 i = 0; i < num_blocks; i++ )
{
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())
{
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index 2832f940f4..2b71cfbe61 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -242,7 +242,7 @@ private: //aligned members
// Updates
//--------------------------------------------------------------------
public:
- void updateDebugText();
+ virtual void updateDebugText();
virtual BOOL updateCharacter(LLAgent &agent);
void idleUpdateVoiceVisualizer(bool voice_enabled);
void idleUpdateMisc(bool detailed_update);
@@ -443,10 +443,11 @@ public:
VisualMuteSettings mVisuallyMuteSetting; // Always or never visually mute this AV
//--------------------------------------------------------------------
- // NPC status
+ // animated object status
//--------------------------------------------------------------------
public:
bool mIsControlAvatar;
+ bool mEnableDefaultMotions;
//--------------------------------------------------------------------
// Morph masks