diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2014-10-09 10:41:30 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2014-10-09 10:41:30 -0400 |
commit | ed9685e41b1b91f63de1964661dacb0718f73186 (patch) | |
tree | 8a9c24df9f735b9a461bca0443b60f767a1e9ac7 /indra/newview/llhudeffectlookat.cpp | |
parent | 1c6b7e19792e02d0b6605ce5c1cae238405de463 (diff) | |
parent | d7db567f27e6cc30aaffaf38d6ea219a7adf4678 (diff) |
merge
Diffstat (limited to 'indra/newview/llhudeffectlookat.cpp')
-rwxr-xr-x | indra/newview/llhudeffectlookat.cpp | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/indra/newview/llhudeffectlookat.cpp b/indra/newview/llhudeffectlookat.cpp index f3a48625a4..fadbf78ca5 100755 --- a/indra/newview/llhudeffectlookat.cpp +++ b/indra/newview/llhudeffectlookat.cpp @@ -39,8 +39,8 @@ #include "llrendersphere.h" #include "llselectmgr.h" #include "llglheaders.h" - - +#include "llfontgl.h" +#include "llhudrender.h" #include "llxmltree.h" @@ -497,14 +497,15 @@ void LLHUDEffectLookAt::render() { gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - LLVector3 target = mTargetPos + ((LLVOAvatar*)(LLViewerObject*)mSourceObject)->mHeadp->getWorldPosition(); + LLVOAvatar* source_avatar = ((LLVOAvatar*)(LLViewerObject*)mSourceObject); + LLVector3 target = mTargetPos + source_avatar->mHeadp->getWorldPosition(); gGL.matrixMode(LLRender::MM_MODELVIEW); gGL.pushMatrix(); gGL.translatef(target.mV[VX], target.mV[VY], target.mV[VZ]); gGL.scalef(0.3f, 0.3f, 0.3f); + LLColor3 color = (*mAttentions)[mTargetType].mColor; gGL.begin(LLRender::LINES); { - LLColor3 color = (*mAttentions)[mTargetType].mColor; gGL.color3f(color.mV[VRED], color.mV[VGREEN], color.mV[VBLUE]); gGL.vertex3f(-1.f, 0.f, 0.f); gGL.vertex3f(1.f, 0.f, 0.f); @@ -516,6 +517,17 @@ void LLHUDEffectLookAt::render() gGL.vertex3f(0.f, 0.f, 1.f); } gGL.end(); gGL.popMatrix(); + + + if(!source_avatar->isSelf()) + { + std::string av_name = source_avatar->getFullname(); + const LLFontGL* big_fontp = LLFontGL::getFontSansSerif(); + gGL.pushMatrix(); + hud_render_utf8text(av_name,target+LLVector3(0.f,0.f,0.4f),*big_fontp,LLFontGL::NORMAL,LLFontGL::DROP_SHADOW_SOFT,-0.5*big_fontp->getWidthF32(av_name),3.f,color,FALSE); + gGL.popMatrix(); + } + } } |