diff options
author | Nyx Linden <nyx@lindenlab.com> | 2013-06-28 11:59:03 -0400 |
---|---|---|
committer | Nyx Linden <nyx@lindenlab.com> | 2013-06-28 11:59:03 -0400 |
commit | 39b734a00199eb7d24edf06f9c496161819ebde7 (patch) | |
tree | 0d2cfd0dba1f6de0a69ab1dddf28cb89e9c307fc /indra/newview | |
parent | 62a6009fa265cd56c8711300a830446b03532785 (diff) |
SH-4240 FIX users can set hover height to 0
removing minimum height enforcement, as changes are local-only and would not
be visible by other users in this repro, unless the user explicitly saved
the changes. Since there are many ways to get around the enforcement, and the
enforced minimums won't be visible to other users, its simpler to allow
users to use the full range of the hover slider.
NOTE: this means that a user's avatar can be underground, leading to the
camera pointing up at the sky. this is a known issue.
Diffstat (limited to 'indra/newview')
-rwxr-xr-x | indra/newview/llvoavatar.cpp | 66 | ||||
-rwxr-xr-x | indra/newview/llvoavatar.h | 3 |
2 files changed, 0 insertions, 69 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 8c20533b4c..2fd26eae80 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5214,72 +5214,6 @@ void LLVOAvatar::updateVisualParams() updateHeadOffset(); } -/*virtual*/ -void LLVOAvatar::computeBodySize() -{ - 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 1.1 meters (server-enforced limit) - // Camera positioning and other things start to break down when your avatar is "walking" while being fully underground - const LLViewerObject * last_object = NULL; - if (isSelf() && getWearableData() && !LLApp::isQuitting()) - { - // Do not force a hover parameter change while we have pending attachments, which may be mesh-based with - // joint offsets. - if (LLAppearanceMgr::instance().getNumAttachmentsInCOF() == getNumAttachments()) - { - LLViewerWearable* shape = (LLViewerWearable*)getWearableData()->getWearable(LLWearableType::WT_SHAPE, 0); - BOOL loaded = TRUE; - for (attachment_map_t::const_iterator points_iter = mAttachmentPoints.begin(); - points_iter != mAttachmentPoints.end() && loaded; - ++points_iter) - { - const LLViewerJointAttachment *attachment_pt = (*points_iter).second; - if (attachment_pt) - { - for (LLViewerJointAttachment::attachedobjs_vec_t::const_iterator attach_iter = attachment_pt->mAttachedObjects.begin(); attach_iter != attachment_pt->mAttachedObjects.end(); attach_iter++) - { - const LLViewerObject* object = (LLViewerObject*)*attach_iter; - if (object) - { - last_object = object; - llwarns << "attachment at point: " << (*points_iter).first << " object exists: " << object->getAttachmentItemID() << llendl; - loaded &=!object->isDrawableState(LLDrawable::REBUILD_ALL); - if (!loaded && shape && !shape->getVolatile()) - { - llwarns << "caught unloaded attachment! skipping enforcement" << llendl; - } - } - } - } - } - - if (last_object) - { - LL_DEBUGS("Avatar") << "scanned at least one object!" << LL_ENDL; - } - if (loaded && shape && !shape->getVolatile()) - { - F32 hover_value = shape->getVisualParamWeight(AVATAR_HOVER); - if (hover_value < 0.0f && (mBodySize.mV[VZ] + hover_value < 1.1f)) - { - hover_value = -(mBodySize.mV[VZ] - 1.1f); // avoid floating point rounding making the above check continue to fail. - llassert(mBodySize.mV[VZ] + hover_value >= 1.1f); - - hover_value = llmin(hover_value, 0.0f); // don't force the hover value to be greater than 0. - - LL_DEBUGS("Avatar") << "changed hover value to: " << hover_value << " from: " << mAvatarOffset.mV[VZ] << LL_ENDL; - - mAvatarOffset.mV[VZ] = hover_value; - shape->setVisualParamWeight(AVATAR_HOVER,hover_value, FALSE); - } - } - } - } -} - - //----------------------------------------------------------------------------- // isActive() //----------------------------------------------------------------------------- diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index fad2fd962c..48b5a6e873 100755 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -212,9 +212,6 @@ public: /*virtual*/ LLVector3 getPosAgentFromGlobal(const LLVector3d &position); virtual void updateVisualParams(); - /*virtual*/ void computeBodySize(); - - /** Inherited ** ** |