RLVa fixes for shownames
This commit is contained in:
@@ -52,9 +52,10 @@
|
||||
// Linden library includes
|
||||
#include "llwindow.h" // setMouseClipping()
|
||||
|
||||
bool getCustomColor(const LLUUID& id, LLColor4& color, LLViewerRegion* parent_estate);
|
||||
bool getCustomColorRLV(const LLUUID& id, LLColor4& color, LLViewerRegion* parent_estate, bool name_restricted);
|
||||
#include "llavatarnamecache.h"
|
||||
#include "llworld.h"
|
||||
#include "rlvhandler.h"
|
||||
|
||||
LLToolGun::LLToolGun( LLToolComposite* composite )
|
||||
: LLTool( std::string("gun"), composite ),
|
||||
@@ -186,10 +187,11 @@ void LLToolGun::draw()
|
||||
{
|
||||
LLAvatarName avatarName;
|
||||
LLAvatarNameCache::get(id, &avatarName);
|
||||
getCustomColor(id, targetColor, world.getRegionFromPosGlobal(targetPosition));
|
||||
bool name_restricted = gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES);
|
||||
getCustomColorRLV(id, targetColor, world.getRegionFromPosGlobal(targetPosition), name_restricted);
|
||||
targetColor.mV[VALPHA] = 0.5f;
|
||||
LLFontGL::getFontSansSerifBold()->renderUTF8(
|
||||
llformat("%s : %.2fm", avatarName.getNSName().c_str(), (targetPosition - myPosition).magVec()),
|
||||
llformat("%s : %.2fm", name_restricted ? RlvStrings::getAnonym(avatarName).c_str() : avatarName.getNSName().c_str(), (targetPosition - myPosition).magVec()),
|
||||
0, (windowWidth / 2.f), (windowHeight / 2.f) - 25.f, targetColor,
|
||||
LLFontGL::HCENTER, LLFontGL::TOP, LLFontGL::BOLD, LLFontGL::NO_SHADOW
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user