diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2013-04-29 14:24:52 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2013-04-29 14:24:52 -0400 |
commit | b814947040f850b6aca207d1d5ad9f8b621c1914 (patch) | |
tree | 286302cadf936632efc7c2fd20fa17a437e16e1b /indra | |
parent | e4c96827d237a489873ce8453640d3a13f83d01a (diff) | |
parent | fcb4f8265dd7ca80ebf858e31b86ac523465e74d (diff) |
merge
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llappearance/llavatarappearance.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp index 0a15f06bfd..0abe9ccb87 100644 --- a/indra/llappearance/llavatarappearance.cpp +++ b/indra/llappearance/llavatarappearance.cpp @@ -491,12 +491,21 @@ void LLAvatarAppearance::computeBodySize() // Certain configurations of avatars can force the overall height (with offset) to go negative. // Enforce a constraint to make sure we don't go below 0.1 meters. // Camera positioning and other things start to break down when your avatar is "walking" while being fully underground - if (new_body_size.mV[VZ] + mAvatarOffset.mV[VZ] < 1.1f) + if (new_body_size.mV[VZ] + mAvatarOffset.mV[VZ] < 1.1f && mAvatarOffset.mV[VZ] < 0.0f) { mAvatarOffset.mV[VZ] = -(new_body_size.mV[VZ] - 1.11f); // avoid floating point rounding making the above check continue to fail. llassert(new_body_size.mV[VZ] + mAvatarOffset.mV[VZ] >= 1.1f); + + // some mesh avatars force the default height to be less than 1.1 meters. Do not force hover to be positive. + // This will allow them to appear to be on the ground, even if the server forces their physics shape to be + // taller than their visual representation. + if (mAvatarOffset.mV[VZ] > 0.0f) + { + mAvatarOffset.mV[VZ] = 0.0f; + } + if (mWearableData && isSelf()) { LLWearable* shape = mWearableData->getWearable(LLWearableType::WT_SHAPE, 0); |