From 4b543b618b101aca9dee1f224d8dbd4fbf937d71 Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Wed, 24 Jul 2024 15:05:08 -0400 Subject: Cache more frequently accessed settings --- indra/newview/llhudtext.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llhudtext.cpp') diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp index 5ee0ab437d..78afe43ffe 100644 --- a/indra/newview/llhudtext.cpp +++ b/indra/newview/llhudtext.cpp @@ -392,7 +392,8 @@ void LLHUDText::updateVisibility() LLVector3 pos_agent_center = gAgent.getPosAgentFromGlobal(mPositionGlobal) - dir_from_camera; F32 last_distance_center = (pos_agent_center - LLViewerCamera::getInstance()->getOrigin()).magVec(); - F32 max_draw_distance = gSavedSettings.getF32("PrimTextMaxDrawDistance"); + static LLCachedControl prim_text_max_dist(gSavedSettings, "PrimTextMaxDrawDistance"); + F32 max_draw_distance = prim_text_max_dist; if(max_draw_distance < 0) { -- cgit v1.2.3 From 3ca9af4d4ac035ed18fa747edd7e0a3bf49b7b32 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Thu, 25 Jul 2024 18:19:55 +0200 Subject: Fix commit 4b543b618b101aca9dee1f224d8dbd4fbf937d71 --- indra/newview/llhudtext.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llhudtext.cpp') diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp index 78afe43ffe..35bcf65db6 100644 --- a/indra/newview/llhudtext.cpp +++ b/indra/newview/llhudtext.cpp @@ -392,7 +392,7 @@ void LLHUDText::updateVisibility() LLVector3 pos_agent_center = gAgent.getPosAgentFromGlobal(mPositionGlobal) - dir_from_camera; F32 last_distance_center = (pos_agent_center - LLViewerCamera::getInstance()->getOrigin()).magVec(); - static LLCachedControl prim_text_max_dist(gSavedSettings, "PrimTextMaxDrawDistance"); + static LLCachedControl prim_text_max_dist(gSavedSettings, "PrimTextMaxDrawDistance"); F32 max_draw_distance = prim_text_max_dist; if(max_draw_distance < 0) -- cgit v1.2.3