summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llvoavatar.cpp30
1 files changed, 12 insertions, 18 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 11b6fec96e..e3eff15815 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -3596,6 +3596,12 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
}
mInAir = in_air;
+ // SL-402: with the ability to animate the position of joints
+ // that affect the body size calculation, computed body size
+ // can get stale much more easily. Simplest fix is to update
+ // it frequently.
+ computeBodySize();
+
// correct for the fact that the pelvis is not necessarily the center
// of the agent's physical representation
root_pos.mdV[VZ] -= (0.5f * mBodySize.mV[VZ]) - mPelvisToFoot;
@@ -3995,16 +4001,7 @@ void LLVOAvatar::debugBodySize() const
void LLVOAvatar::postPelvisSetRecalc()
{
mRoot->updateWorldMatrixChildren();
- // BENTO extra tracing around computeBodySize()
- LLVector3 body_size = mBodySize;
- LLVector3 avatar_offset = mAvatarOffset;
computeBodySize();
- if (mBodySize != body_size || mAvatarOffset != avatar_offset)
- {
- debugBodySize();
- LL_DEBUGS("Avatar") << avString() << "old mBodySize " << body_size << " old mAvatarOffset " << avatar_offset << LL_ENDL;
- LL_DEBUGS("Avatar") << avString() << "new mBodySize " << mBodySize << " new mAvatarOffset " << mAvatarOffset << LL_ENDL;
- }
dirtyMesh(2);
}
//------------------------------------------------------------------------
@@ -5947,16 +5944,7 @@ void LLVOAvatar::updateVisualParams()
if (mLastSkeletonSerialNum != mSkeletonSerialNum)
{
- // BENTO extra tracing around computeBodySize()
- LLVector3 body_size = mBodySize;
- LLVector3 avatar_offset = mAvatarOffset;
computeBodySize();
- if (mBodySize != body_size || mAvatarOffset != avatar_offset)
- {
- debugBodySize();
- LL_DEBUGS("Avatar") << avString() << "old mBodySize " << body_size << " old mAvatarOffset " << avatar_offset << LL_ENDL;
- LL_DEBUGS("Avatar") << avString() << "new mBodySize " << mBodySize << " new mAvatarOffset " << mAvatarOffset << LL_ENDL;
- }
mLastSkeletonSerialNum = mSkeletonSerialNum;
mRoot->updateWorldMatrixChildren();
}
@@ -8397,6 +8385,12 @@ void LLVOAvatar::dumpArchetypeXML(const std::string& prefix, bool group_by_weara
}
}
+ // Root joint
+ const LLVector3& pos = mRoot->getPosition();
+ const LLVector3& scale = mRoot->getScale();
+ apr_file_printf( file, "\t\t<root name=\"%s\" position=\"%f %f %f\" scale=\"%f %f %f\"/>\n",
+ mRoot->getName().c_str(), pos[0], pos[1], pos[2], scale[0], scale[1], scale[2]);
+
// Bones
avatar_joint_list_t::iterator iter = mSkeleton.begin();
avatar_joint_list_t::iterator end = mSkeleton.end();