Made new nametag behavior (CHUI-89; nametag stays over avatar's head when it's moving due to animations) optional and enable legacy behavior by default
parent
8380fe9f71
commit
21f992ea35
|
|
@ -20810,5 +20810,16 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>FSLegacyNametagPosition</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Enables the legacy nametag behavior of staying fixed at the avatar's position instead of following animation movements.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
</map>
|
||||
</llsd>
|
||||
|
|
|
|||
|
|
@ -3184,6 +3184,23 @@ void LLVOAvatar::idleUpdateNameTagPosition(const LLVector3& root_pos_last)
|
|||
local_camera_up.normalize();
|
||||
local_camera_up = local_camera_up * inv_root_rot;
|
||||
|
||||
// <FS:Ansariel> Optional legacy nametag position
|
||||
LLVector3 name_position;
|
||||
static LLCachedControl<bool> fsLegacyNametagPosition(gSavedSettings, "FSLegacyNametagPosition");
|
||||
if (fsLegacyNametagPosition)
|
||||
{
|
||||
local_camera_up.scaleVec((mBodySize + mAvatarOffset) * 0.5f);
|
||||
local_camera_at.scaleVec((mBodySize + mAvatarOffset) * 0.5f);
|
||||
|
||||
name_position = mRoot->getWorldPosition();
|
||||
name_position[VZ] -= mPelvisToFoot;
|
||||
name_position[VZ] += ((mBodySize[VZ] + mAvatarOffset[VZ])* 0.55f);
|
||||
name_position += (local_camera_up * root_rot) - (projected_vec(local_camera_at * root_rot, camera_to_av));
|
||||
name_position += pixel_up_vec * 15.f;
|
||||
}
|
||||
else
|
||||
{
|
||||
// </FS:Ansariel>
|
||||
LLVector3 avatar_ellipsoid(mBodySize.mV[VX] * 0.4f,
|
||||
mBodySize.mV[VY] * 0.4f,
|
||||
mBodySize.mV[VZ] * NAMETAG_VERT_OFFSET_WEIGHT);
|
||||
|
|
@ -3200,9 +3217,14 @@ void LLVOAvatar::idleUpdateNameTagPosition(const LLVector3& root_pos_last)
|
|||
|
||||
mCurRootToHeadOffset = lerp(mCurRootToHeadOffset, mTargetRootToHeadOffset, LLCriticalDamp::getInterpolant(0.2f));
|
||||
|
||||
LLVector3 name_position = mRoot->getLastWorldPosition() + (mCurRootToHeadOffset * root_rot);
|
||||
// <FS:Ansariel> Optional legacy nametag position
|
||||
//LLVector3 name_position = mRoot->getLastWorldPosition() + (mCurRootToHeadOffset * root_rot);
|
||||
name_position = mRoot->getLastWorldPosition() + (mCurRootToHeadOffset * root_rot);
|
||||
name_position += (local_camera_up * root_rot) - (projected_vec(local_camera_at * root_rot, camera_to_av));
|
||||
name_position += pixel_up_vec * NAMETAG_VERTICAL_SCREEN_OFFSET;
|
||||
// <FS:Ansariel> Optional legacy nametag position
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
// <FS:Ansariel> Optional Z-offset correction for name tags
|
||||
static LLCachedControl<S32> fsNameTagOffset(gSavedSettings, "FSNameTagZOffsetCorrection");
|
||||
|
|
|
|||
|
|
@ -406,6 +406,19 @@
|
|||
<check_box.commit_callback
|
||||
function="FS.ToggleSortContacts" />
|
||||
</check_box>
|
||||
|
||||
<check_box
|
||||
control_name="FSLegacyNametagPosition"
|
||||
enabled_control="AvatarNameTagMode"
|
||||
height="16"
|
||||
label="Legacy nametag positioning"
|
||||
layout="topleft"
|
||||
left="30"
|
||||
width="140"
|
||||
top_pad="3"
|
||||
name="FSLegacyNametagPosition"
|
||||
tool_tip="If enabled, the nametag will stay at fixed at the avatar position and not follow the avatar head if it moves because of animations."
|
||||
top_delta="0" />
|
||||
|
||||
<!-- FIRE-5505 Commented out "Publish radar tags to LSL" for now
|
||||
<check_box
|
||||
|
|
@ -427,7 +440,7 @@
|
|||
height="13"
|
||||
layout="topleft"
|
||||
left="30"
|
||||
top_pad="20"
|
||||
top_pad="15"
|
||||
name="title_afk_text"
|
||||
width="260">
|
||||
Away timeout:
|
||||
|
|
|
|||
Loading…
Reference in New Issue