From d58b9ee54e84b709e063cdbbc349de25feafa59b Mon Sep 17 00:00:00 2001 From: Nyx Linden Date: Thu, 25 Apr 2013 14:09:42 -0400 Subject: 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 --- indra/llappearance/llavatarappearance.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'indra/llappearance/llavatarappearance.cpp') 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()) { -- cgit v1.2.3 From f35a229281c1b9dbec1f6f939e97344ed86d5429 Mon Sep 17 00:00:00 2001 From: Nyx Linden Date: Thu, 25 Apr 2013 16:17:01 -0400 Subject: BUILDFIX: removing unused variables --- indra/llappearance/llavatarappearance.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra/llappearance/llavatarappearance.cpp') diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp index 0196558a5a..0a15f06bfd 100644 --- a/indra/llappearance/llavatarappearance.cpp +++ b/indra/llappearance/llavatarappearance.cpp @@ -493,8 +493,6 @@ void LLAvatarAppearance::computeBodySize() // 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) { - 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] >= 1.1f); -- cgit v1.2.3 From fcb4f8265dd7ca80ebf858e31b86ac523465e74d Mon Sep 17 00:00:00 2001 From: Nyx Linden Date: Mon, 29 Apr 2013 11:49:49 -0400 Subject: SH-4146 FIX petite avatars can't touch the ground adjusted avatar hover limits to make sure that they are not forced to go above the default --- indra/llappearance/llavatarappearance.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'indra/llappearance/llavatarappearance.cpp') 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); -- cgit v1.2.3 From af1431731802320e241037486b8bff0003a4d827 Mon Sep 17 00:00:00 2001 From: Nyx Linden Date: Thu, 2 May 2013 13:56:10 -0400 Subject: 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. --- indra/llappearance/llavatarappearance.cpp | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'indra/llappearance/llavatarappearance.cpp') 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; -- cgit v1.2.3 From 82f147367fb5e4ee4bbe53db01856ea375058825 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 19 Sep 2013 11:10:59 -0400 Subject: SH-3455 WIP - removing bake upload code --- indra/llappearance/llavatarappearance.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) mode change 100644 => 100755 indra/llappearance/llavatarappearance.cpp (limited to 'indra/llappearance/llavatarappearance.cpp') diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp old mode 100644 new mode 100755 index e3497c107d..05cd7e8c41 --- a/indra/llappearance/llavatarappearance.cpp +++ b/indra/llappearance/llavatarappearance.cpp @@ -1361,14 +1361,14 @@ BOOL LLAvatarAppearance::teToColorParams( ETextureIndex te, U32 *param_name ) return TRUE; } -void LLAvatarAppearance::setClothesColor( ETextureIndex te, const LLColor4& new_color, BOOL upload_bake ) +void LLAvatarAppearance::setClothesColor( ETextureIndex te, const LLColor4& new_color) { U32 param_name[3]; if( teToColorParams( te, param_name ) ) { - setVisualParamWeight( param_name[0], new_color.mV[VX], upload_bake ); - setVisualParamWeight( param_name[1], new_color.mV[VY], upload_bake ); - setVisualParamWeight( param_name[2], new_color.mV[VZ], upload_bake ); + setVisualParamWeight( param_name[0], new_color.mV[VX]); + setVisualParamWeight( param_name[1], new_color.mV[VY]); + setVisualParamWeight( param_name[2], new_color.mV[VZ]); } } -- cgit v1.2.3 From d58e7cfbfcec163345e87c0c5e5f74d01075246b Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 19 Sep 2013 13:59:20 -0400 Subject: SH-3455 WIP - removing bake upload code --- indra/llappearance/llavatarappearance.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/llappearance/llavatarappearance.cpp') diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp index 05cd7e8c41..f10ae813fd 100755 --- a/indra/llappearance/llavatarappearance.cpp +++ b/indra/llappearance/llavatarappearance.cpp @@ -491,7 +491,6 @@ void LLAvatarAppearance::computeBodySize() if (new_body_size != mBodySize || old_offset != mAvatarOffset.mV[VZ]) { mBodySize = new_body_size; - bodySizeChanged(); } } -- cgit v1.2.3