Skip to content

Commit 2c91aed

Browse files
FelixWolfakleshchev
authored andcommitted
Add explaination as to why we do clearing inside effect set* functions
1 parent c9aae54 commit 2c91aed

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

indra/newview/llhudeffectlookat.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,7 @@ bool LLHUDEffectLookAt::setLookAt(ELookAtType target_type, LLViewerObject *objec
401401
static LLCachedControl<bool> enable_lookat_hints(gSavedSettings, "EnableLookAtTarget", true);
402402
if (!enable_lookat_hints)
403403
{
404+
// Clear the effect so it doesn't linger around if it gets disabled
404405
if (mTargetType != LOOKAT_TARGET_IDLE)
405406
{
406407
mTargetObject = gAgentAvatarp;

indra/newview/llhudeffectpointat.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ bool LLHUDEffectPointAt::setPointAt(EPointAtType target_type, LLViewerObject *ob
230230
static LLCachedControl<bool> enable_selection_hints(gSavedSettings, "EnableSelectionHints", true);
231231
if (!enable_selection_hints)
232232
{
233+
// Clear the effect so it doesn't linger around if it gets disabled
233234
if (mTargetType != POINTAT_TARGET_NONE)
234235
{
235236
clearPointAtTarget();

0 commit comments

Comments
 (0)