diff options
author | Nyx Linden <nyx@lindenlab.com> | 2013-04-25 14:09:42 -0400 |
---|---|---|
committer | Nyx Linden <nyx@lindenlab.com> | 2013-04-25 14:09:42 -0400 |
commit | d58b9ee54e84b709e063cdbbc349de25feafa59b (patch) | |
tree | 3beb8df824ee71e17069f23e49ed97ae627d80ef /indra/llappearance | |
parent | b4c60f430332674e5dbdb672152e62d252e9a6e1 (diff) |
SH-4050 FIX camera goes underground if hover set low enough
Changing viewer limit for avatar height to match server limit, camera does not go underground.
Also clarified where we do not need avatar offset in the code, through comments
Diffstat (limited to 'indra/llappearance')
-rw-r--r-- | indra/llappearance/llavatarappearance.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp index 3bb759d458..0196558a5a 100644 --- a/indra/llappearance/llavatarappearance.cpp +++ b/indra/llappearance/llavatarappearance.cpp @@ -491,11 +491,13 @@ 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] < 0.1f) + if (new_body_size.mV[VZ] + mAvatarOffset.mV[VZ] < 1.1f) { - mAvatarOffset.mV[VZ] = -(new_body_size.mV[VZ] - 0.11f); // avoid floating point rounding making the above check continue to fail. + F32 old_offset = mAvatarOffset.mV[VZ]; + F32 old_effective_height = new_body_size.mV[VZ] + mAvatarOffset.mV[VZ]; + 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] >= 0.1f); + llassert(new_body_size.mV[VZ] + mAvatarOffset.mV[VZ] >= 1.1f); if (mWearableData && isSelf()) { |