diff options
author | Rye Mutt <rye@alchemyviewer.org> | 2024-07-24 15:05:08 -0400 |
---|---|---|
committer | Rye Mutt <rye@alchemyviewer.org> | 2024-07-24 15:05:08 -0400 |
commit | 4b543b618b101aca9dee1f224d8dbd4fbf937d71 (patch) | |
tree | 78c3346c9818caace51b6f68a77a39840f03ef4e /indra/newview/llhudtext.cpp | |
parent | df459684d430910e44ddb1abc6f231c6d460442f (diff) |
Cache more frequently accessed settings
Diffstat (limited to 'indra/newview/llhudtext.cpp')
-rw-r--r-- | indra/newview/llhudtext.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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<bool> prim_text_max_dist(gSavedSettings, "PrimTextMaxDrawDistance"); + F32 max_draw_distance = prim_text_max_dist; if(max_draw_distance < 0) { |