summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2026-03-07 14:55:05 +0800
committerErik Kundiman <erik@megapahit.org>2026-03-07 14:55:05 +0800
commiteac10375e294cd24c21c09497e838e70dcf4d74a (patch)
tree4b53b1ebc1582e3323c80953236dca6b3a92ab65 /indra/newview/llvoavatar.cpp
parent8142dd11b4cae8d4768a2d985a24340163a42a5c (diff)
parent3529bc5f9d29a71355f3a3666540abff57dc1a4c (diff)
Merge tag 'Second_Life_Release#3529bc5f-2026.02' into 2026.02
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 e2cafffb51..384b45ca4c 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -218,6 +218,13 @@ enum ERenderName
RENDER_NAME_FADE
};
+enum ERenderGroupTitle
+{
+ RENDER_GROUP_TITLE_NEVER,
+ RENDER_GROUP_TITLE_SELF,
+ RENDER_GROUP_TITLE_ALWAYS
+};
+
#define JELLYDOLLS_SHOULD_IMPOSTOR
//-----------------------------------------------------------------------------
@@ -608,7 +615,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;
@@ -3584,9 +3591,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);
@@ -11451,12 +11459,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);
}
});
}