summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
authorDessie Linden <dessie@lindenlab.com>2010-06-25 12:39:46 -0700
committerDessie Linden <dessie@lindenlab.com>2010-06-25 12:39:46 -0700
commit3240b188e958fa6232ddb03bc29adb968c7521ac (patch)
tree2ee6663288dd21f03444a435addbb1925dd389e6 /indra/newview/llvoavatar.cpp
parent89ff83d2e7aa6f5af27c3e235b467e5fcd2937a4 (diff)
parent62cd50fe1edd67308cf0a2e5407bd4005e705681 (diff)
Merged from viewer-release
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r--indra/newview/llvoavatar.cpp28
1 files changed, 19 insertions, 9 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index e79174e2f1..4be703cfb0 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -2078,7 +2078,8 @@ void LLVOAvatar::computeBodySize()
ankle.mV[VZ] * knee_scale.mV[VZ] -
foot.mV[VZ] * ankle_scale.mV[VZ];
- mBodySize.mV[VZ] = mPelvisToFoot +
+ LLVector3 new_body_size;
+ new_body_size.mV[VZ] = mPelvisToFoot +
// the sqrt(2) correction below is an approximate
// correction to get to the top of the head
F_SQRT2 * (skull.mV[VZ] * head_scale.mV[VZ]) +
@@ -2088,8 +2089,17 @@ void LLVOAvatar::computeBodySize()
torso.mV[VZ] * pelvis_scale.mV[VZ];
// TODO -- measure the real depth and width
- mBodySize.mV[VX] = DEFAULT_AGENT_DEPTH;
- mBodySize.mV[VY] = DEFAULT_AGENT_WIDTH;
+ new_body_size.mV[VX] = DEFAULT_AGENT_DEPTH;
+ new_body_size.mV[VY] = DEFAULT_AGENT_WIDTH;
+
+ if (new_body_size != mBodySize)
+ {
+ mBodySize = new_body_size;
+ if (isSelf())
+ { // notify simulator of change in size
+ gAgent.sendAgentSetAppearance();
+ }
+ }
/* debug spam
std::cout << "skull = " << skull << std::endl; // adebug
@@ -2524,7 +2534,7 @@ void LLVOAvatar::idleUpdateAppearanceAnimation()
param;
param = getNextVisualParam())
{
- if (param->getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE)
+ if (param->isTweakable())
{
param->stopAnimating(FALSE);
}
@@ -2547,7 +2557,7 @@ void LLVOAvatar::idleUpdateAppearanceAnimation()
param;
param = getNextVisualParam())
{
- if (param->getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE)
+ if (param->isTweakable())
{
param->animate(morph_amt, FALSE);
}
@@ -6546,7 +6556,7 @@ bool LLVOAvatar::visualParamWeightsAreDefault()
param;
param = getNextVisualParam())
{
- if (param->getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE)
+ if (param->isTweakable())
{
LLViewerVisualParam* vparam = dynamic_cast<LLViewerVisualParam*>(param);
llassert(vparam);
@@ -6656,7 +6666,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
{
for( S32 i = 0; i < num_blocks; i++ )
{
- while( param && (param->getGroup() != VISUAL_PARAM_GROUP_TWEAKABLE) )
+ while( param && (param->getGroup() != VISUAL_PARAM_GROUP_TWEAKABLE) ) // should not be any of group VISUAL_PARAM_GROUP_TWEAKABLE_NO_TRANSMIT
{
param = getNextVisualParam();
}
@@ -6689,7 +6699,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
}
}
- const S32 expected_tweakable_count = getVisualParamCountInGroup(VISUAL_PARAM_GROUP_TWEAKABLE);
+ const S32 expected_tweakable_count = getVisualParamCountInGroup(VISUAL_PARAM_GROUP_TWEAKABLE); // don't worry about VISUAL_PARAM_GROUP_TWEAKABLE_NO_TRANSMIT
if (num_blocks != expected_tweakable_count)
{
llinfos << "Number of params in AvatarAppearance msg (" << num_blocks << ") does not match number of tweakable params in avatar xml file (" << expected_tweakable_count << "). Processing what we can. object: " << getID() << llendl;
@@ -6976,7 +6986,7 @@ void LLVOAvatar::dumpArchetypeXML( void* )
{
LLViewerVisualParam* viewer_param = (LLViewerVisualParam*)param;
if( (viewer_param->getWearableType() == type) &&
- (viewer_param->getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE) )
+ (viewer_param->isTweakable() ) )
{
apr_file_printf(file, "\t\t<param id=\"%d\" name=\"%s\" value=\"%.3f\"/>\n",
viewer_param->getID(), viewer_param->getName().c_str(), viewer_param->getWeight());