Only render friends when AlwaysRenderFriends is set to 2

This commit is contained in:
Lirusaito
2019-07-10 20:50:44 -04:00
parent 564a9abf42
commit 311020034e
2 changed files with 7 additions and 3 deletions

View File

@@ -12685,11 +12685,11 @@ This should be as low as possible, but too low may break functionality</string>
<key>AlwaysRenderFriends</key> <key>AlwaysRenderFriends</key>
<map> <map>
<key>Comment</key> <key>Comment</key>
<string>Always render friends regardless of max complexity</string> <string>Always render friends regardless of max complexity, a value of 2 will only render friends</string>
<key>Persist</key> <key>Persist</key>
<integer>1</integer> <integer>1</integer>
<key>Type</key> <key>Type</key>
<string>Boolean</string> <string>S32</string>
<key>Value</key> <key>Value</key>
<integer>0</integer> <integer>0</integer>
</map> </map>

View File

@@ -8628,12 +8628,16 @@ BOOL LLVOAvatar::isFullyLoaded() const
bool LLVOAvatar::isTooComplex() const bool LLVOAvatar::isTooComplex() const
{ {
static const LLCachedControl<bool> always_render_friends("AlwaysRenderFriends", true); static const LLCachedControl<S32> always_render_friends("AlwaysRenderFriends", 0);
bool too_complex; bool too_complex;
if (isSelf() || (always_render_friends && LLAvatarTracker::instance().isBuddy(getID()))) if (isSelf() || (always_render_friends && LLAvatarTracker::instance().isBuddy(getID())))
{ {
too_complex = false; too_complex = false;
} }
else if (always_render_friends == 2)
{
too_complex = true;
}
else else
{ {
// Determine if visually muted or not // Determine if visually muted or not