diff options
| author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-07-05 14:42:47 -0400 | 
|---|---|---|
| committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-07-05 14:42:47 -0400 | 
| commit | 3bc8a974400bccc05d05984adb103f98c43c86ab (patch) | |
| tree | 4582addb18c6e2d1cd97f4832a410cfc8cfd0a4f /indra/newview | |
| parent | 99250b4e0c26e20d9162ab10d999827f006da256 (diff) | |
SL-402 - update mBodySize more frequently to avoid inconsistent vertical positioning of avatar.
Diffstat (limited to 'indra/newview')
| -rw-r--r-- | indra/newview/llvoavatar.cpp | 30 | 
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(); | 
