diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml index 97d81153a7ad57dd54a86921df66e24097f57e18..d119504017d6ae6a1dbb1a9c1f9fbcf6904492c6 100755 --- a/indra/newview/app_settings/settings_per_account.xml +++ b/indra/newview/app_settings/settings_per_account.xml @@ -1,9 +1,9 @@ <llsd> <map> - <key>AvatarPosFinalOffset</key> + <key>AvatarHoverOffsetZ</key> <map> <key>Comment</key> - <string>After-everything-else fixup for avatar position.</string> + <string>After-everything-else fixup for avatar Z position.</string> <key>Persist</key> <integer>1</integer> <key>Type</key> diff --git a/indra/newview/llfloaterhoverheight.cpp b/indra/newview/llfloaterhoverheight.cpp index dc8a3d6fb85524409f61b29212260210f2865a65..2ac61efc0c1a85ef52724175d63cd9fc5d6f7c5e 100755 --- a/indra/newview/llfloaterhoverheight.cpp +++ b/indra/newview/llfloaterhoverheight.cpp @@ -42,16 +42,16 @@ LLFloaterHoverHeight::LLFloaterHoverHeight(const LLSD& key) : LLFloater(key) void LLFloaterHoverHeight::syncFromPreferenceSetting(void *user_data) { - F32 value = gSavedPerAccountSettings.getF32("AvatarPosFinalOffset"); + F32 value = gSavedPerAccountSettings.getF32("AvatarHoverOffsetZ"); LLFloaterHoverHeight *self = static_cast<LLFloaterHoverHeight*>(user_data); LLSliderCtrl* sldrCtrl = self->getChild<LLSliderCtrl>("HoverHeightSlider"); sldrCtrl->setValue(value,FALSE); - //value = sldrCtrl->getValueF32(); - //gAgentAvatarp->mHoverOffset = LLVector3(0.0, 0.0, value); if (isAgentAvatarValid()) { + LLVector3 offset(0.0, 0.0, llclamp(value,MIN_HOVER_Z,MAX_HOVER_Z)); + gAgentAvatarp->mHoverOffset = offset; gAgentAvatarp->sendHoverHeight(); } } @@ -68,13 +68,13 @@ BOOL LLFloaterHoverHeight::postBuild() // Initialize slider from pref setting. syncFromPreferenceSetting(this); // Update slider on future pref changes. - if (gSavedPerAccountSettings.getControl("AvatarPosFinalOffset")) + if (gSavedPerAccountSettings.getControl("AvatarHoverOffsetZ")) { - gSavedPerAccountSettings.getControl("AvatarPosFinalOffset")->getCommitSignal()->connect(boost::bind(&syncFromPreferenceSetting, this)); + gSavedPerAccountSettings.getControl("AvatarHoverOffsetZ")->getCommitSignal()->connect(boost::bind(&syncFromPreferenceSetting, this)); } else { - LL_WARNS() << "Control not found for AvatarPosFinalOffset" << LL_ENDL; + LL_WARNS() << "Control not found for AvatarHoverOffsetZ" << LL_ENDL; } return TRUE; @@ -95,7 +95,7 @@ void LLFloaterHoverHeight::onFinalCommit() { LLSliderCtrl* sldrCtrl = getChild<LLSliderCtrl>("HoverHeightSlider"); F32 value = sldrCtrl->getValueF32(); - gSavedPerAccountSettings.setF32("AvatarPosFinalOffset",value); + gSavedPerAccountSettings.setF32("AvatarHoverOffsetZ",value); } diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index fd741e7e5f8011d6d75f6d96154a676f141366f4..6669a797ce13d520044003b992072bb4c73dea76 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -7470,12 +7470,12 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) mHoverOffset = contents.mHoverOffset; } - if (!contents.mHoverOffsetWasSet) + if (!contents.mHoverOffsetWasSet && !isSelf()) { // If we don't get a value at all, we are presumably in a // region that does not support hover height. - LL_WARNS() << "zeroing hover because not defined in appearance message" << LL_ENDL; + LL_WARNS() << avString() << "zeroing hover because not defined in appearance message" << LL_ENDL; mHoverOffset = LLVector3(0.0, 0.0, 0.0); } diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 1b5901e58194ce24ec557988eab6e3380aafd876..ed560b1c30b63c6d5535f99b3eba0cf24d70ec57 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -239,7 +239,7 @@ void LLVOAvatarSelf::initInstance() return; } - F32 hover_z = gSavedPerAccountSettings.getF32("AvatarPosFinalOffset"); + F32 hover_z = gSavedPerAccountSettings.getF32("AvatarHoverOffsetZ"); mHoverOffset = LLVector3(0.0, 0.0, llclamp(hover_z,MIN_HOVER_Z,MAX_HOVER_Z)); LL_INFOS("Avatar") << avString() << " set hover height from debug setting " << mHoverOffset[2] << LL_ENDL;