RLVa fixes for shownames
This commit is contained in:
@@ -55,6 +55,7 @@
|
||||
#include "llviewerwindow.h"
|
||||
#include "llviewercontrol.h"
|
||||
// </edit>
|
||||
#include "rlvhandler.h"
|
||||
|
||||
|
||||
// packet layout
|
||||
@@ -553,6 +554,8 @@ void LLHUDEffectLookAt::render()
|
||||
if (!LLAvatarNameCache::getNSName(static_cast<LLVOAvatar*>(mSourceObject.get())->getID(), text, lookAtNames)) return;
|
||||
if (text.length() > 9 && 0 == text.compare(text.length() - 9, 9, " Resident"))
|
||||
text.erase(text.length() - 9);
|
||||
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
|
||||
text = RlvStrings::getAnonym(text);
|
||||
LLVector3 offset = gAgentCamera.getCameraPositionAgent() - target;
|
||||
offset.normalize();
|
||||
LLVector3 shadow_offset = offset * 0.49f;
|
||||
|
||||
@@ -591,7 +591,7 @@ void LLNetMap::draw()
|
||||
else
|
||||
{
|
||||
bool getCustomColorRLV(const LLUUID&, LLColor4&, LLViewerRegion*, bool name_restricted);
|
||||
getCustomColorRLV(uuid, color, LLWorld::getInstance()->getRegionFromPosGlobal(position), show_friends);
|
||||
getCustomColorRLV(uuid, color, LLWorld::getInstance()->getRegionFromPosGlobal(position), !show_friends);
|
||||
}
|
||||
|
||||
LLWorldMapView::drawAvatar(
|
||||
|
||||
@@ -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