summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/app_settings/settings_per_account.xml4
-rwxr-xr-xindra/newview/llfloaterhoverheight.cpp14
-rwxr-xr-xindra/newview/llvoavatar.cpp4
-rwxr-xr-xindra/newview/llvoavatarself.cpp2
4 files changed, 12 insertions, 12 deletions
diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml
index 97d81153a7..d119504017 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 dc8a3d6fb8..2ac61efc0c 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 fd741e7e5f..6669a797ce 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 1b5901e581..ed560b1c30 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;