diff options
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
| -rw-r--r-- | indra/newview/llvoavatar.cpp | 27 |
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); } }); } |
