summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <118752495+marchcat@users.noreply.github.com>2026-05-21 20:03:14 +0300
committerGitHub <noreply@github.com>2026-05-21 20:03:14 +0300
commit627bb8feff264a6077dcf435e5656145d566e94a (patch)
tree55af7639161926313434d9e4a8b9872369668d5d /indra/newview/llvoavatar.cpp
parentff536adef0b74c20f55bd501ad593e4eef762082 (diff)
parent15d82beb6056fa16a1ea1cbf01c5d673a95e0267 (diff)
Merge pull request #5852 from secondlife/marchcat/slua-26.2
26.2 -> SLua viewer
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r--indra/newview/llvoavatar.cpp27
1 files changed, 20 insertions, 7 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 14de3461c9..8994a2b4d3 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -217,6 +217,13 @@ enum ERenderName
RENDER_NAME_FADE
};
+enum ERenderGroupTitle
+{
+ RENDER_GROUP_TITLE_NEVER,
+ RENDER_GROUP_TITLE_SELF,
+ RENDER_GROUP_TITLE_ALWAYS
+};
+
#define JELLYDOLLS_SHOULD_IMPOSTOR
//-----------------------------------------------------------------------------
@@ -607,7 +614,7 @@ const LLUUID LLVOAvatar::sStepSounds[LL_MCODE_END] =
};
S32 LLVOAvatar::sRenderName = RENDER_NAME_ALWAYS;
-bool LLVOAvatar::sRenderGroupTitles = true;
+S32 LLVOAvatar::sRenderGroupTitles = RENDER_GROUP_TITLE_ALWAYS;
S32 LLVOAvatar::sNumVisibleChatBubbles = 0;
bool LLVOAvatar::sDebugInvisible = false;
bool LLVOAvatar::sShowAttachmentPoints = false;
@@ -3551,9 +3558,10 @@ void LLVOAvatar::idleUpdateNameTagText(bool new_name)
addNameTagLine(line, name_tag_color, LLFontGL::NORMAL,
LLFontGL::getFontSansSerifSmall());
}
+ bool render_title = (sRenderGroupTitles == RENDER_GROUP_TITLE_ALWAYS) ||
+ (isSelf() && (sRenderGroupTitles == RENDER_GROUP_TITLE_SELF));
- if (sRenderGroupTitles
- && title && title->getString() && title->getString()[0] != '\0')
+ if (render_title && title && title->getString() && title->getString()[0] != '\0')
{
std::string title_str = title->getString();
LLStringFn::replace_ascii_controlchars(title_str,LL_UNKNOWN_CHAR);
@@ -11417,12 +11425,17 @@ void LLVOAvatar::calculateUpdateRenderComplexity()
LLPerfStats::tunables.userFPSTuningStrategy != LLPerfStats::TUNE_SCENE_ONLY &&
!isVisuallyMuted())
{
- LLUUID id = getID(); // <== use id to make sure this avatar didn't get deleted between frames
- LL::WorkQueue::getInstance("mainloop")->post([this, id]()
+ const LLUUID id = getID(); // <== use id to make sure this avatar didn't get deleted between frames
+ LL::WorkQueue::getInstance("mainloop")->post([id]()
{
- if (gObjectList.findObject(id) != nullptr)
+ LLViewerObject* obj = gObjectList.findObject(id);
+ if (obj
+ && !obj->isDead()
+ && obj->isAvatar()
+ && obj->mDrawable)
{
- gPipeline.profileAvatar(this);
+ LLVOAvatar* avatar = (LLVOAvatar*)obj;
+ gPipeline.profileAvatar(avatar);
}
});
}