summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerdisplay.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerdisplay.cpp')
-rw-r--r--indra/newview/llviewerdisplay.cpp24
1 files changed, 21 insertions, 3 deletions
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index 314e32bffd..7d97151e9d 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -316,6 +316,24 @@ static void update_tp_display(bool minimized)
{
// Transition to REQUESTED. Viewer has sent some kind
// of TeleportRequest to the source simulator
+
+ // NaCl: Right-click + scroll wheel zoom in mouselook (ported from Firestorm).
+ // Reset the mouselook zoom state on teleport so we don't get stuck at
+ // the zoomed FOV after arriving at the destination.
+ if (gAgentCamera.cameraMouselook())
+ {
+ LLVector3 mlFovValues = gSavedSettings.getVector3("_NACL_MLFovValues");
+ bool wasZoomed = (mlFovValues.mV[VZ] > 0.0f);
+ mlFovValues.mV[VZ] = 0.0f; // clear "currently zoomed" flag
+ gSavedSettings.setVector3("_NACL_MLFovValues", mlFovValues);
+ if (wasZoomed)
+ {
+ // Restore the normal (pre-zoom) FOV
+ gSavedSettings.setF32("CameraAngle", mlFovValues.mV[VX]);
+ }
+ }
+ // NaCl End
+
gTeleportDisplayTimer.reset();
const std::string& msg = LLAgent::sTeleportProgressMessages["requesting"];
LL_INFOS("Teleport") << "A teleport request has been sent, setting state to TELEPORT_REQUESTED" << LL_ENDL;
@@ -576,9 +594,9 @@ void display(bool rebuild, F32 zoom_factor, int subfield, bool for_snapshot)
LLImageGL::updateStats(gFrameTimeSeconds);
static LLCachedControl<S32> avatar_name_tag_mode(gSavedSettings, "AvatarNameTagMode", 1);
- static LLCachedControl<bool> name_tag_show_group_titles(gSavedSettings, "NameTagShowGroupTitles", true);
+ static LLCachedControl<S32> name_tag_show_group_titles(gSavedSettings, "GroupTitlesTagMode", 2 /*all group tags*/);
LLVOAvatar::sRenderName = avatar_name_tag_mode;
- LLVOAvatar::sRenderGroupTitles = name_tag_show_group_titles && avatar_name_tag_mode > 0;
+ LLVOAvatar::sRenderGroupTitles = avatar_name_tag_mode > 0 ? name_tag_show_group_titles : 0;
gPipeline.mBackfaceCull = true;
gFrameCount++;
@@ -1109,7 +1127,7 @@ void display(bool rebuild, F32 zoom_factor, int subfield, bool for_snapshot)
if (gShaderProfileFrame)
{
gShaderProfileFrame = false;
- boost::json::value stats{ boost::json::object_kind };
+ boost::json::value stats( boost::json::object_kind );
getProfileStatsContext(stats.as_object());
LLGLSLShader::finishProfile(stats);