diff options
| author | Richard Linden <none@none> | 2010-06-24 14:58:51 -0700 | 
|---|---|---|
| committer | Richard Linden <none@none> | 2010-06-24 14:58:51 -0700 | 
| commit | e7040fad36bd03407f5c51e9cac809ce8b98c900 (patch) | |
| tree | ad5776eb8593ad1bebbcd18dcca931f5301176b2 | |
| parent | 1a98b7128ad08bafaabd3d1274059f0ae34b30a1 (diff) | |
EXT-7999 FIX avatars have bent knees
EXT-7567 FIX My feet are missing when walking on the ground
reviewed by Nyx
| -rw-r--r-- | indra/newview/llvoavatar.cpp | 16 | 
1 files changed, 13 insertions, 3 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 3dce4ce0bc..320b68144a 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2076,7 +2076,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]) +  @@ -2086,8 +2087,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  | 
