Add explaination as to why we do clearing inside effect set* functions

master
Kyler Eastridge 2025-07-29 13:51:17 +01:00 committed by Andrey Kleshchev
parent c9aae542d6
commit 2c91aed07b
2 changed files with 2 additions and 0 deletions

View File

@ -401,6 +401,7 @@ bool LLHUDEffectLookAt::setLookAt(ELookAtType target_type, LLViewerObject *objec
static LLCachedControl<bool> enable_lookat_hints(gSavedSettings, "EnableLookAtTarget", true);
if (!enable_lookat_hints)
{
// Clear the effect so it doesn't linger around if it gets disabled
if (mTargetType != LOOKAT_TARGET_IDLE)
{
mTargetObject = gAgentAvatarp;

View File

@ -230,6 +230,7 @@ bool LLHUDEffectPointAt::setPointAt(EPointAtType target_type, LLViewerObject *ob
static LLCachedControl<bool> enable_selection_hints(gSavedSettings, "EnableSelectionHints", true);
if (!enable_selection_hints)
{
// Clear the effect so it doesn't linger around if it gets disabled
if (mTargetType != POINTAT_TARGET_NONE)
{
clearPointAtTarget();