From 64bf42d8799aa5c85d0aef43b3dbba39d89d552d Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Sun, 31 Oct 2021 16:59:39 -0400
Subject: [PATCH] optimize isTooComplex

---
 indra/newview/llvoavatar.cpp | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 089830d63e8..a66291f9103 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -8337,9 +8337,7 @@ bool LLVOAvatar::isTooComplex() const
 {
 	static const LLCachedControl<bool> always_render_friends(gSavedSettings, "AlwaysRenderFriends", false);
 	bool too_complex;
-	bool render_friend =  (always_render_friends && isInBuddyList());
-
-	if (isSelf() || render_friend || mVisuallyMuteSetting == AV_ALWAYS_RENDER)
+	if (isSelf() || mVisuallyMuteSetting == AV_ALWAYS_RENDER || (always_render_friends && isInBuddyList()))
 	{
 		too_complex = false;
 	}
-- 
GitLab