Chat spheres: use established code convention for checking if setting is enabled
Signed-off-by: PanteraPolnocy <panterapolnocy@gmail.com>master
parent
57e284042c
commit
6c4445b04b
|
|
@ -1801,8 +1801,7 @@ static void renderChatRangeSphere(const LLVector3& center, F32 radius, const LLC
|
||||||
|
|
||||||
static void drawChatRangeSpheres()
|
static void drawChatRangeSpheres()
|
||||||
{
|
{
|
||||||
static LLCachedControl<bool> show_spheres(gSavedSettings, "FSShowChatRangeSpheres", false);
|
if (!isAgentAvatarValid())
|
||||||
if (!show_spheres() || !isAgentAvatarValid())
|
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -1855,7 +1854,11 @@ void render_ui_3d()
|
||||||
}
|
}
|
||||||
|
|
||||||
// <FS:PP> Render chat range spheres in 3D world
|
// <FS:PP> Render chat range spheres in 3D world
|
||||||
drawChatRangeSpheres();
|
static LLCachedControl<bool> show_spheres(gSavedSettings, "FSShowChatRangeSpheres", false);
|
||||||
|
if (show_spheres())
|
||||||
|
{
|
||||||
|
drawChatRangeSpheres();
|
||||||
|
}
|
||||||
// </FS:PP>
|
// </FS:PP>
|
||||||
|
|
||||||
gViewerWindow->renderSelections(false, false, true); // Non HUD call in render_hud_elements
|
gViewerWindow->renderSelections(false, false, true); // Non HUD call in render_hud_elements
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue