[RLVa] Respect @showloc in IFF

This commit is contained in:
Inusaito Sayori
2015-03-19 00:04:12 -04:00
parent 0681b88cbc
commit 8cc2499f0a

View File

@@ -189,9 +189,10 @@ void LLToolGun::draw()
LLAvatarNameCache::get(id, &avatarName);
bool name_restricted = gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES);
getCustomColorRLV(id, targetColor, world.getRegionFromPosGlobal(targetPosition), name_restricted);
const std::string name(name_restricted ? RlvStrings::getAnonym(avatarName) : avatarName.getNSName());
targetColor.mV[VALPHA] = 0.5f;
LLFontGL::getFontSansSerifBold()->renderUTF8(
llformat("%s : %.2fm", name_restricted ? RlvStrings::getAnonym(avatarName).c_str() : avatarName.getNSName().c_str(), (targetPosition - myPosition).magVec()),
gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC) ? name : llformat("%s : %.2fm", name.c_str(), (targetPosition - myPosition).magVec()),
0, (windowWidth / 2.f), (windowHeight / 2.f) - 25.f, targetColor,
LLFontGL::HCENTER, LLFontGL::TOP, LLFontGL::BOLD, LLFontGL::NO_SHADOW
);