From 6c4445b04b434441f7f075ef64009d79f92c7ab6 Mon Sep 17 00:00:00 2001 From: PanteraPolnocy Date: Sat, 13 Dec 2025 19:39:44 +0100 Subject: [PATCH] Chat spheres: use established code convention for checking if setting is enabled Signed-off-by: PanteraPolnocy --- indra/newview/llviewerdisplay.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 2b8f89ac6e..bdec5ad327 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -1801,8 +1801,7 @@ static void renderChatRangeSphere(const LLVector3& center, F32 radius, const LLC static void drawChatRangeSpheres() { - static LLCachedControl show_spheres(gSavedSettings, "FSShowChatRangeSpheres", false); - if (!show_spheres() || !isAgentAvatarValid()) + if (!isAgentAvatarValid()) { return; } @@ -1855,7 +1854,11 @@ void render_ui_3d() } // Render chat range spheres in 3D world - drawChatRangeSpheres(); + static LLCachedControl show_spheres(gSavedSettings, "FSShowChatRangeSpheres", false); + if (show_spheres()) + { + drawChatRangeSpheres(); + } // gViewerWindow->renderSelections(false, false, true); // Non HUD call in render_hud_elements