Code cleanup - revert 7f59e7d893

Signed-off-by: PanteraPolnocy <panterapolnocy@gmail.com>
This commit is contained in:
PanteraPolnocy
2026-06-20 18:14:55 +02:00
parent 003af2dcbc
commit 846b653b8f
11 changed files with 50 additions and 35 deletions
+2 -2
View File
@@ -2486,7 +2486,7 @@ void LLAgent::propagate(const F32 dt)
LLVector3 land_vel = getVelocity();
land_vel.mV[VZ] = 0.f;
static LLCachedControl<bool> automatic_fly(gSavedSettings, "AutomaticFly", true); // <FS:PP> Speed optimisation
static LLCachedControl<bool> automatic_fly(gSavedSettings, "AutomaticFly"); // <FS:PP> Speed optimisation
if (!in_air
&& gAgentCamera.getUpKey() < 0
&& land_vel.magVecSquared() < MAX_VELOCITY_AUTO_LAND_SQUARED
@@ -5552,7 +5552,7 @@ void LLAgent::setTeleportState(ETeleportState state)
mTeleportState = state;
// <FS:PP> Speed optimisation
// if (mTeleportState > TELEPORT_NONE && gSavedSettings.getBOOL("FreezeTime"))
static LLCachedControl<bool> freeze_time(gSavedSettings, "FreezeTime", false);
static LLCachedControl<bool> freeze_time(gSavedSettings, "FreezeTime");
if (mTeleportState > TELEPORT_NONE && freeze_time())
// </FS:PP>
{
+7 -7
View File
@@ -344,7 +344,7 @@ void LLAgentCamera::resetView(bool reset_camera, bool change_camera, bool moveme
// <FS:PP> Speed optimisation
// if (change_camera && !gSavedSettings.getBOOL("FreezeTime"))
static LLCachedControl<bool> freeze_time(gSavedSettings, "FreezeTime", false);
static LLCachedControl<bool> freeze_time(gSavedSettings, "FreezeTime");
if (change_camera && !freeze_time)
// </FS:PP>
{
@@ -1074,7 +1074,7 @@ void LLAgentCamera::cameraOrbitIn(const F32 meters)
// <FS:PP> Speed optimisation
// if (!gSavedSettings.getBOOL("FreezeTime") && mCameraZoomFraction < MIN_ZOOM_FRACTION && meters > 0.f)
static LLCachedControl<bool> freeze_time(gSavedSettings, "FreezeTime", false);
static LLCachedControl<bool> freeze_time(gSavedSettings, "FreezeTime");
if (!freeze_time && mCameraZoomFraction < MIN_ZOOM_FRACTION && meters > 0.f)
// </FS:PP>
{
@@ -1282,8 +1282,8 @@ void LLAgentCamera::updateLookAt(const S32 mouse_x, const S32 mouse_y)
// <FS:PP> Speed optimisation
// frameCamera.yaw( - x_from_center * gSavedSettings.getF32("YawFromMousePosition") * DEG_TO_RAD);
// frameCamera.pitch( - y_from_center * gSavedSettings.getF32("PitchFromMousePosition") * DEG_TO_RAD);
static LLCachedControl<F32> yaw_from_mouse_position(gSavedSettings, "YawFromMousePosition", 90.f);
static LLCachedControl<F32> pitch_from_mouse_position(gSavedSettings, "PitchFromMousePosition", 90.f);
static LLCachedControl<F32> yaw_from_mouse_position(gSavedSettings, "YawFromMousePosition");
static LLCachedControl<F32> pitch_from_mouse_position(gSavedSettings, "PitchFromMousePosition");
frameCamera.yaw( - x_from_center * yaw_from_mouse_position() * DEG_TO_RAD);
frameCamera.pitch( - y_from_center * pitch_from_mouse_position() * DEG_TO_RAD);
// </FS:PP>
@@ -1586,7 +1586,7 @@ void LLAgentCamera::updateCamera()
// <FS:PP> Speed optimisation
// F32 smoothing = LLSmoothInterpolation::getInterpolant(gSavedSettings.getF32("CameraPositionSmoothing") * SMOOTHING_HALF_LIFE, false);
static LLCachedControl<F32> camera_position_smoothing(gSavedSettings, "CameraPositionSmoothing", 1.f);
static LLCachedControl<F32> camera_position_smoothing(gSavedSettings, "CameraPositionSmoothing");
F32 smoothing = LLSmoothInterpolation::getInterpolant(camera_position_smoothing() * SMOOTHING_HALF_LIFE, false);
// </FS:PP>
@@ -2322,8 +2322,8 @@ LLVector3d LLAgentCamera::getFocusOffsetInitial()
// [RLVa:KB] - @setcam_eyeoffsetscale
F32 LLAgentCamera::getCameraOffsetScale() const
{
static LLCachedControl<F32> camera_offset_scale(gSavedSettings, "CameraOffsetScale", 1.f);
static LLCachedControl<F32> camera_offset_scale_rlva(gSavedSettings, "CameraOffsetScaleRLVa", 0.f);
static LLCachedControl<F32> camera_offset_scale(gSavedSettings, "CameraOffsetScale");
static LLCachedControl<F32> camera_offset_scale_rlva(gSavedSettings, "CameraOffsetScaleRLVa");
return (ECameraPreset::CAMERA_RLV_SETCAM_VIEW != mCameraPreset) ? camera_offset_scale() : camera_offset_scale_rlva();
}
// [/RLVa:KB]
+2 -2
View File
@@ -824,7 +824,7 @@ void LLBumpImageList::generateNormalMapFromAlpha(LLImageRaw* src, LLImageRaw* nr
// <FS:PP> Attempt to speed up things a little
// F32 norm_scale = gSavedSettings.getF32("RenderNormalMapScale");
static LLCachedControl<F32> RenderNormalMapScale(gSavedSettings, "RenderNormalMapScale", 64.f);
static LLCachedControl<F32> RenderNormalMapScale(gSavedSettings, "RenderNormalMapScale");
F32 norm_scale = RenderNormalMapScale;
// </FS:PP>
@@ -937,7 +937,7 @@ void LLBumpImageList::onSourceUpdated(LLViewerTexture* src, EBumpEffect bump_cod
// <FS:PP> Speed optimisation
// gNormalMapGenProgram.uniform1f(sNormScale, gSavedSettings.getF32("RenderNormalMapScale"));
static LLCachedControl<F32> RenderNormalMapScale(gSavedSettings, "RenderNormalMapScale", 64.f);
static LLCachedControl<F32> RenderNormalMapScale(gSavedSettings, "RenderNormalMapScale");
gNormalMapGenProgram.uniform1f(sNormScale, RenderNormalMapScale());
// </FS:PP>
gNormalMapGenProgram.uniform1f(sStepX, 1.f / bump->getWidth());
+2 -2
View File
@@ -5209,8 +5209,8 @@ void LLSelectMgr::deselectAllIfTooFar()
// if (gSavedSettings.getBOOL("LimitSelectDistance")
// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Modified: RLVa-0.2.0f
static RlvCachedBehaviourModifier<float> s_nFartouchDist(RLV_MODIFIER_FARTOUCHDIST);
static LLCachedControl<bool> limit_select_distance(gSavedSettings, "LimitSelectDistance", true);
static LLCachedControl<F32> max_select_distance(gSavedSettings, "MaxSelectDistance", 128.f);
static LLCachedControl<bool> limit_select_distance(gSavedSettings, "LimitSelectDistance");
static LLCachedControl<F32> max_select_distance(gSavedSettings, "MaxSelectDistance");
bool fRlvFartouch = gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH) && LLToolMgr::instance().inEdit();
if ( (limit_select_distance() || (fRlvFartouch) )
// [/RLVa:KB]
+5 -2
View File
@@ -333,7 +333,7 @@ void LLViewerCamera::setPerspective(bool for_selection,
// ...select distance from control
// <FS:PP> Speed optimisation
// z_far = gSavedSettings.getF32("MaxSelectDistance");
static LLCachedControl<F32> max_select_distance(gSavedSettings, "MaxSelectDistance", 128.f);
static LLCachedControl<F32> max_select_distance(gSavedSettings, "MaxSelectDistance");
z_far = max_select_distance();
// </FS:PP>
}
@@ -845,8 +845,11 @@ bool LLViewerCamera::isDefaultFOVChanged()
if(mPrevCameraFOVDefault != mCameraFOVDefault)
{
mPrevCameraFOVDefault = mCameraFOVDefault;
static LLCachedControl<bool> ignore_fov_zoom_for_lods(gSavedSettings, "IgnoreFOVZoomForLODs", false);
// <FS:PP> Speed optimisation
// return !gSavedSettings.getBOOL("IgnoreFOVZoomForLODs");
static LLCachedControl<bool> ignore_fov_zoom_for_lods(gSavedSettings, "IgnoreFOVZoomForLODs");
return !ignore_fov_zoom_for_lods();
// </FS:PP>
}
return false;
}
+19 -7
View File
@@ -306,9 +306,9 @@ static void update_tp_display(bool minimized)
static LLCachedControl<F32> teleport_local_delay(gSavedSettings, "TeleportLocalDelay");
// <FS:PP> Speed optimisation
static LLCachedControl<bool> disable_teleport_screens(gSavedSettings, "FSDisableTeleportScreens", false);
static LLCachedControl<bool> reset_camera_on_tp(gSavedSettings, "FSResetCameraOnTP", true);
static LLCachedControl<LLVector3> nacl_ml_fov_values(gSavedSettings, "_NACL_MLFovValues", LLVector3(1.047197551f, 1.047197551f, 0.f));
static LLCachedControl<bool> disable_teleport_screens(gSavedSettings, "FSDisableTeleportScreens");
static LLCachedControl<bool> reset_camera_on_tp(gSavedSettings, "FSResetCameraOnTP");
static LLCachedControl<LLVector3> nacl_ml_fov_values(gSavedSettings, "_NACL_MLFovValues");
// </FS:PP>
S32 attach_count = 0;
@@ -343,7 +343,10 @@ static void update_tp_display(bool minimized)
const std::string& msg = LLAgent::sTeleportProgressMessages["pending"];
if (!minimized)
{
gViewerWindow->setShowProgress(true, !disable_teleport_screens()); // <FS:PP> Speed optimisation
// <FS:PP> Speed optimisation
// gViewerWindow->setShowProgress(true, !gSavedSettings.getBOOL("FSDisableTeleportScreens"));
gViewerWindow->setShowProgress(true, !disable_teleport_screens());
// </FS:PP>
gViewerWindow->setProgressPercent(llmin(teleport_percent, 0.0f));
gViewerWindow->setProgressString(msg);
}
@@ -362,12 +365,18 @@ static void update_tp_display(bool minimized)
// If someone knows how to call "View.ZoomDefault" by hand, we should do that instead of
// replicating the behavior here. -Zi
LLViewerCamera::instance().setDefaultFOV(DEFAULT_FIELD_OF_VIEW);
if (reset_camera_on_tp()) // <FS:PP> Speed optimisation
// <FS:PP> Speed optimisation
// if (gSavedSettings.getBOOL("FSResetCameraOnTP"))
if (reset_camera_on_tp())
// </FS:PP>
{
gSavedSettings.setF32("CameraAngle", LLViewerCamera::instance().getView()); // FS:LO Dont reset rightclick zoom when we teleport however. Fixes FIRE-6246.
}
// also, reset the marker for "currently zooming" in the mouselook zoom settings. -Zi
LLVector3 vTemp = nacl_ml_fov_values(); // <FS:PP> Speed optimisation
// <FS:PP> Speed optimisation
// LLVector3 vTemp = gSavedSettings.getVector3("_NACL_MLFovValues");
LLVector3 vTemp = nacl_ml_fov_values();
// </FS:PP>
vTemp.mV[VZ] = 0.0f;
gSavedSettings.setVector3("_NACL_MLFovValues", vTemp);
}
@@ -380,7 +389,10 @@ static void update_tp_display(bool minimized)
FSData::instance().selectNextMOTD();
if (!minimized)
{
gViewerWindow->setShowProgress(true, !disable_teleport_screens()); // <FS:PP> Speed optimisation
// <FS:PP> Speed optimisation
// gViewerWindow->setShowProgress(true, !gSavedSettings.getBOOL("FSDisableTeleportScreens"));
gViewerWindow->setShowProgress(true, !disable_teleport_screens());
// </FS:PP>
gViewerWindow->setProgressPercent(llmin(teleport_percent, 0.0f));
gViewerWindow->setProgressString(msg);
gViewerWindow->setProgressMessage(gAgent.mMOTD);
+3 -3
View File
@@ -107,7 +107,7 @@ bool agent_jump( EKeystate s )
}
// </FS:Ansariel>
static LLCachedControl<bool> automatic_fly(gSavedSettings, "AutomaticFly", true); // <FS:PP> Speed optimisation
static LLCachedControl<bool> automatic_fly(gSavedSettings, "AutomaticFly"); // <FS:PP> Speed optimisation
if( time < FLY_TIME
|| frame_count <= FLY_FRAMES
|| gAgent.upGrabbed()
@@ -170,7 +170,7 @@ static void agent_check_temporary_run(LLAgent::EDoubleTapRunMode mode)
static void agent_handle_doubletap_run(EKeystate s, LLAgent::EDoubleTapRunMode mode)
{
static LLCachedControl<bool> allow_tap_tap_hold_run(gSavedSettings, "AllowTapTapHoldRun", true); // <FS:PP> Speed optimisation
static LLCachedControl<bool> allow_tap_tap_hold_run(gSavedSettings, "AllowTapTapHoldRun"); // <FS:PP> Speed optimisation
if (KEYSTATE_UP == s)
{
// Note: in case shift is already released, slide left/right run
@@ -244,7 +244,7 @@ bool agent_push_backward( EKeystate s )
{
if(gAgent.isMovementLocked()) return true;
static LLCachedControl<bool> leave_mouselook(gSavedSettings, "LeaveMouselook", false); // <FS:PP> Speed optimisation
static LLCachedControl<bool> leave_mouselook(gSavedSettings, "LeaveMouselook"); // <FS:PP> Speed optimisation
//in free camera control mode we need to intercept keyboard events for avatar movements
if (LLFloaterCamera::inFreeCameraMode())
{
+2 -2
View File
@@ -1429,7 +1429,7 @@ void LLViewerJoystick::scanJoystick()
LL_PROFILE_ZONE_SCOPED_CATEGORY_INPUT;
// <FS:PP> Speed optimisation
// if (mDriverState != JDS_INITIALIZED || !gSavedSettings.getBOOL("JoystickEnabled"))
static LLCachedControl<bool> joystick_enabled(gSavedSettings, "JoystickEnabled", false);
static LLCachedControl<bool> joystick_enabled(gSavedSettings, "JoystickEnabled");
if (mDriverState != JDS_INITIALIZED || !joystick_enabled())
// </FS:PP>
{
@@ -1466,7 +1466,7 @@ void LLViewerJoystick::scanJoystick()
// <FS:PP> Speed optimisation
// if (!mOverrideCamera && !(LLToolMgr::getInstance()->inBuildMode() && gSavedSettings.getBOOL("JoystickBuildEnabled")))
static LLCachedControl<bool> joystick_build_enabled(gSavedSettings, "JoystickBuildEnabled", false);
static LLCachedControl<bool> joystick_build_enabled(gSavedSettings, "JoystickBuildEnabled");
if (!mOverrideCamera && !(LLToolMgr::getInstance()->inBuildMode() && joystick_build_enabled()))
// </FS:PP>
{
+3 -3
View File
@@ -481,9 +481,9 @@ void update_statistics()
// sample(LLStatViewer::ENABLE_VBO, (F64)gSavedSettings.getBOOL("RenderVBOEnable"));
// sample(LLStatViewer::DRAW_DISTANCE, (F64)gSavedSettings.getF32("RenderFarClip"));
// sample(LLStatViewer::CHAT_BUBBLES, gSavedSettings.getBOOL("UseChatBubbles"));
static LLCachedControl<bool> render_vbo_enable(gSavedSettings, "RenderVBOEnable", true);
static LLCachedControl<F32> render_far_clip(gSavedSettings, "RenderFarClip", 256.f);
static LLCachedControl<bool> use_chat_bubbles(gSavedSettings, "UseChatBubbles", false);
static LLCachedControl<bool> render_vbo_enable(gSavedSettings, "RenderVBOEnable");
static LLCachedControl<F32> render_far_clip(gSavedSettings, "RenderFarClip");
static LLCachedControl<bool> use_chat_bubbles(gSavedSettings, "UseChatBubbles");
sample(LLStatViewer::ENABLE_VBO, (F64)render_vbo_enable());
sample(LLStatViewer::DRAW_DISTANCE, (F64)render_far_clip());
sample(LLStatViewer::CHAT_BUBBLES, use_chat_bubbles());
+1 -1
View File
@@ -2067,7 +2067,7 @@ bool LLUIImageList::initFromFile()
// <FS:PP> Speed optimisation
// if (!gSavedSettings.getBOOL("NoPreload"))
static LLCachedControl<bool> no_preload(gSavedSettings, "NoPreload", false);
static LLCachedControl<bool> no_preload(gSavedSettings, "NoPreload");
if (!no_preload())
// </FS:PP>
{
+4 -4
View File
@@ -7369,10 +7369,10 @@ void LLViewerWindow::setUIVisibility(bool visible)
}
// <FS:Ansariel> Notification not showing if hiding the UI
static LLCachedControl<bool> autohide_chat_bar(gSavedSettings, "AutohideChatBar", false);
static LLCachedControl<bool> show_navbar_navigation_panel(gSavedSettings, "ShowNavbarNavigationPanel", false);
static LLCachedControl<bool> show_navbar_favorites_panel(gSavedSettings, "ShowNavbarFavoritesPanel", true);
static LLCachedControl<bool> internal_show_group_notices_top_right(gSavedSettings, "InternalShowGroupNoticesTopRight", true);
static LLCachedControl<bool> autohide_chat_bar(gSavedSettings, "AutohideChatBar");
static LLCachedControl<bool> show_navbar_navigation_panel(gSavedSettings, "ShowNavbarNavigationPanel");
static LLCachedControl<bool> show_navbar_favorites_panel(gSavedSettings, "ShowNavbarFavoritesPanel");
static LLCachedControl<bool> internal_show_group_notices_top_right(gSavedSettings, "InternalShowGroupNoticesTopRight");
FSNearbyChat::instance().showDefaultChatBar(visible && !autohide_chat_bar());
gSavedSettings.setBOOL("FSInternalShowNavbarNavigationPanel", visible && show_navbar_navigation_panel());
gSavedSettings.setBOOL("FSInternalShowNavbarFavoritesPanel", visible && show_navbar_favorites_panel());