From 2c91aed07be5d598bffd2d320345bb33cbaa3e41 Mon Sep 17 00:00:00 2001 From: Kyler Eastridge Date: Tue, 29 Jul 2025 13:51:17 +0100 Subject: Add explaination as to why we do clearing inside effect set* functions --- indra/newview/llhudeffectlookat.cpp | 1 + indra/newview/llhudeffectpointat.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/indra/newview/llhudeffectlookat.cpp b/indra/newview/llhudeffectlookat.cpp index f995048210..776d2dd31e 100644 --- a/indra/newview/llhudeffectlookat.cpp +++ b/indra/newview/llhudeffectlookat.cpp @@ -401,6 +401,7 @@ bool LLHUDEffectLookAt::setLookAt(ELookAtType target_type, LLViewerObject *objec static LLCachedControl 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; diff --git a/indra/newview/llhudeffectpointat.cpp b/indra/newview/llhudeffectpointat.cpp index b6515df3e1..c600010f6b 100644 --- a/indra/newview/llhudeffectpointat.cpp +++ b/indra/newview/llhudeffectpointat.cpp @@ -230,6 +230,7 @@ bool LLHUDEffectPointAt::setPointAt(EPointAtType target_type, LLViewerObject *ob static LLCachedControl 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(); -- cgit v1.2.3