summaryrefslogtreecommitdiff
path: root/indra/llappearance
diff options
context:
space:
mode:
authorNyx Linden <nyx@lindenlab.com>2013-05-02 13:56:10 -0400
committerNyx Linden <nyx@lindenlab.com>2013-05-02 13:56:10 -0400
commitaf1431731802320e241037486b8bff0003a4d827 (patch)
treefb6c1fc2351872760c3b23f1b9257c9e50d64ab6 /indra/llappearance
parentfcb4f8265dd7ca80ebf858e31b86ac523465e74d (diff)
SH-4060 FIX avatar hover being set to minimum at seemingly random times
avatar hover was being temporarily set to -2.0 for the preview render, which was triggering the minimum enforcement, even when the user's requested value is no where near the minimum. Added a flag to disable the minimum enforcement if we are temporarily changing the value.
Diffstat (limited to 'indra/llappearance')
-rw-r--r--indra/llappearance/llavatarappearance.cpp28
-rw-r--r--indra/llappearance/llavatarappearance.h2
2 files changed, 1 insertions, 29 deletions
diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp
index 0abe9ccb87..e3497c107d 100644
--- a/indra/llappearance/llavatarappearance.cpp
+++ b/indra/llappearance/llavatarappearance.cpp
@@ -488,34 +488,6 @@ void LLAvatarAppearance::computeBodySize()
mAvatarOffset.mV[VX] = 0.0f;
mAvatarOffset.mV[VY] = 0.0f;
- // 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 && 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);
- if (shape)
- {
- shape->setVisualParamWeight(AVATAR_HOVER, mAvatarOffset.mV[VZ], false);
- }
- }
- }
-
if (new_body_size != mBodySize || old_offset != mAvatarOffset.mV[VZ])
{
mBodySize = new_body_size;
diff --git a/indra/llappearance/llavatarappearance.h b/indra/llappearance/llavatarappearance.h
index bce2540258..0a6a236d34 100644
--- a/indra/llappearance/llavatarappearance.h
+++ b/indra/llappearance/llavatarappearance.h
@@ -137,7 +137,7 @@ public:
typedef std::map<std::string, LLJoint*> joint_map_t;
joint_map_t mJointMap;
- void computeBodySize();
+ virtual void computeBodySize();
protected: