diff options
| author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2024-05-20 17:16:18 +0300 |
|---|---|---|
| committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2024-05-20 19:34:42 +0300 |
| commit | 6d6eabca44d08d5b97bfe3e941d2b9687c2246ea (patch) | |
| tree | 40202fcf4d6226ebda64a1b2208e2d8931f29463 /indra/newview/llvoavatar.cpp | |
| parent | e1493a10b46bb53af165e4f23fda0fedd3193269 (diff) | |
triage#59 Render Friends Only option
An option for performance testing, video recording or taking photos, so
that unexpected people won't appear in your photos or tests.
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
| -rw-r--r-- | indra/newview/llvoavatar.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 35fc82126a..e4f7e8292c 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2586,6 +2586,27 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time) LL_INFOS() << "Warning! Idle on dead avatar" << LL_ENDL; return; } + + LLCachedControl<bool> friends_only(gSavedSettings, "RenderAvatarFriendsOnly", false); + if (friends_only() + && !isUIAvatar() + && !isControlAvatar() + && !isSelf() + && !isBuddy()) + { + if (mNameText) + { + mNameIsSet = false; + mNameText->markDead(); + mNameText = NULL; + sNumVisibleChatBubbles--; + } + deleteParticleSource(); + mVoiceVisualizer->setVoiceEnabled(false); + + return; + } + // record time and refresh "tooSlow" status updateTooSlow(); @@ -11722,4 +11743,8 @@ F32 LLVOAvatar::getAverageGPURenderTime() return ret; } +bool LLVOAvatar::isBuddy() const +{ + return LLAvatarTracker::instance().isBuddy(getID()); +} |
