[RLV] 2.9: @shownametags

This hides name tags and names whenever possible, except from chat.. when not possible, falls back on anonyms

Changed: Radar no longer hidess based on @shownames, that's silly.. now radar hides names when @shownames
Radar will alert when @shownames restricted, but not when @shownametags restricted
Radar will not offer menu when @shownames or @shownametags restricted, and the IM and Profile buttons will disable.

Hopefully fixed broken RLVa logic in llfloaterobjectiminfo.cpp
Fix slightly broken RLVa logic code in llpanelpermissions.cpp
Changed: Range Finder now disallowed when minimap disabled, show loc restriction doesn't change it anymore.
Fix broken hiding of names when offering teleports; rlv_shownames param doesn't seem to always pass, work around those situations...
^-This causes some false positives, I suppose, if you offer teleport from friends list to someone in the region, but better safe than sorry.
This commit is contained in:
Inusaito Sayori
2015-05-22 16:53:32 -04:00
parent aa1e0ce067
commit 4f8cbb8c06
23 changed files with 170 additions and 62 deletions

View File

@@ -66,11 +66,17 @@ const F32 DEAD_KEEP_TIME = 0.5f;
extern U32 gFrameCount;
const S32& radar_namesystem()
{
static const LLCachedControl<S32> namesystem("RadarNameSystem");
return namesystem;
}
namespace
{
void chat_avatar_status(const std::string& name, const LLUUID& key, ERadarStatType type, bool entering, const F32& dist)
{
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) return; // RLVa:LF Don't announce people are around when blind, that cheats the system.
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS)) return; // RLVa:LF Don't announce people are around when blind, that cheats the system.
static LLCachedControl<bool> radar_chat_alerts(gSavedSettings, "RadarChatAlerts");
if (!radar_chat_alerts) return;
static LLCachedControl<bool> radar_alert_sim(gSavedSettings, "RadarAlertSim");
@@ -102,7 +108,8 @@ namespace
if (radar_show_dist) chat.mText += llformat(" (%.2fm)", dist);
}
chat.mFromName = name;
chat.mURL = llformat("secondlife:///app/agent/%s/about",key.asString().c_str());
if (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) // RLVa:LF - No way!
chat.mURL = llformat("secondlife:///app/agent/%s/about", key.asString().c_str());
chat.mSourceType = CHAT_SOURCE_SYSTEM;
LLFloaterChat::addChat(chat);
}
@@ -202,6 +209,18 @@ bool LLAvatarListEntry::isDead() const
{
return getEntryAgeSeconds() > DEAD_KEEP_TIME;
}
void LLAvatarListEntry::resetName(const bool& hide_tags, const bool& anon_names, const std::string& hidden)
{
if (hide_tags)
mName = hidden;
else
{
LLAvatarNameCache::getNSName(mID, mName, radar_namesystem()); // We wouldn't be alive if this were to fail now.
if (anon_names) mName = RlvStrings::getAnonym(mName);
}
}
const F32 ACTIVITY_TIMEOUT = 1.0f;
void LLAvatarListEntry::setActivity(ACTIVITY_TYPE activity)
{
@@ -241,14 +260,6 @@ LLFloaterAvatarList::~LLFloaterAvatarList()
//static
void LLFloaterAvatarList::toggleInstance(const LLSD&)
{
// [RLVa:KB]
if(gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
{
if(instanceExists())
getInstance()->close();
}
else
// [/RLVa:KB]
if (!instanceVisible())
{
showInstance();
@@ -262,10 +273,6 @@ void LLFloaterAvatarList::toggleInstance(const LLSD&)
//static
void LLFloaterAvatarList::showInstance()
{
// [RLVa:KB]
if(gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
return;
// [/RLVa:KB]
getInstance()->open();
}
@@ -292,6 +299,12 @@ void LLFloaterAvatarList::onClose(bool app_quitting)
}
}
BOOL LLFloaterAvatarList::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS) || gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) return TRUE; // RLVa:LF - No menu, menus share listeners with others that we may want to work; plus the user has no idea who these people are!!
return LLFloater::handleRightMouseDown(x, y, mask);
}
static void cmd_profile(const LLAvatarListEntry* entry);
static void cmd_toggle_mark(LLAvatarListEntry* entry);
static void cmd_ar(const LLAvatarListEntry* entry);
@@ -538,12 +551,16 @@ void LLFloaterAvatarList::updateAvatarList()
static LLCachedControl<bool> announce(gSavedSettings, "RadarChatKeys");
std::queue<LLUUID> announce_keys;
bool no_names(gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS));
bool anon_names(!no_names && gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES));
const std::string& rlv_hidden(RlvStrings::getString(RLV_STRING_HIDDEN));
for (LLWorld::pos_map_t::const_iterator i = avs.cbegin(), end = avs.cend(); i != end; ++i)
{
const LLUUID& avid = i->first;
std::string name;
static const LLCachedControl<S32> namesystem("RadarNameSystem");
if (!LLAvatarNameCache::getNSName(avid, name, namesystem)) continue; //prevent (Loading...)
if (no_names) name = rlv_hidden;
else if (!LLAvatarNameCache::getNSName(avid, name, radar_namesystem())) continue; //prevent (Loading...)
else if (anon_names) name = RlvStrings::getAnonym(name);
LLVector3d position = i->second;
@@ -650,7 +667,7 @@ void LLFloaterAvatarList::updateAvatarSorting()
}
}
bool getCustomColor(const LLUUID& id, LLColor4& color, LLViewerRegion* parent_estate);
bool getCustomColorRLV(const LLUUID& id, LLColor4& color, LLViewerRegion* parent_estate, bool name_restricted);
/**
* Redraws the avatar list
@@ -680,6 +697,7 @@ void LLFloaterAvatarList::refreshAvatarList()
localRectToScreen(getLocalRect(), &screen_rect);
speakermgr.update(!(screen_rect.pointInRect(gViewerWindow->getCurrentMouseX(), gViewerWindow->getCurrentMouseY()) && gMouseIdleTimer.getElapsedTimeF32() < 5.f));
bool name_restricted(gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS) || gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES));
BOOST_FOREACH(av_list_t::value_type& entry, mAvatars)
{
// Skip if avatar hasn't been around
@@ -737,7 +755,7 @@ void LLFloaterAvatarList::refreshAvatarList()
}
//<edit> custom colors for certain types of avatars!
getCustomColor(av_id, color, LLWorld::getInstance()->getRegionFromPosGlobal(entry->getPosition()));
getCustomColorRLV(av_id, color, LLWorld::getInstance()->getRegionFromPosGlobal(entry->getPosition()), name_restricted);
name.color = color*0.5f + unselected_color*0.5f;
element.columns.add(name);
}
@@ -997,6 +1015,19 @@ void LLFloaterAvatarList::refreshAvatarList()
}
void LLFloaterAvatarList::resetAvatarNames()
{
bool hide_tags(gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS));
bool anon_names(gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES));
const std::string& hidden(RlvStrings::getString(RLV_STRING_HIDDEN));
BOOST_FOREACH(av_list_t::value_type& entry, mAvatars)
{
entry->resetName(hide_tags, anon_names, hidden);
}
getChildView("profile_btn")->setEnabled(!hide_tags && !anon_names);
getChildView("im_btn")->setEnabled(!hide_tags && !anon_names);
}
void LLFloaterAvatarList::onClickIM()
{
//llinfos << "LLFloaterFriends::onClickIM()" << llendl;
@@ -1107,6 +1138,11 @@ BOOL LLFloaterAvatarList::handleKeyHere(KEY key, MASK mask)
}
if (MASK_SHIFT == mask)
{
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS) || gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) // RLVa:LF - Don't you dare!
{
make_ui_sound("UISndInvalidOp");
return true;
}
onClickIM();
return true;
}

View File

@@ -97,6 +97,11 @@ enum ACTIVITY_TYPE
*/
F32 getEntryAgeSeconds() const;
/*
* @brief resets the name accordance with RLVa
*/
void resetName(const bool& hide_tags, const bool& anon_names, const std::string& hidden);
/**
* @brief Returns the name of the avatar
*/
@@ -211,6 +216,7 @@ public:
/*virtual*/ void onOpen();
/*virtual*/ BOOL postBuild();
/*virtual*/ void draw();
/*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
/**
* @brief Toggles interface visibility
* There is only one instance of the avatar scanner at any time.
@@ -233,6 +239,11 @@ public:
*/
void refreshAvatarList();
/**
* @brief Reset avatar names in accordance with RLVa
*/
void resetAvatarNames();
/**
* @brief Returns the entry for an avatar, if preset
* @returns Pointer to avatar entry, NULL if not found.

View File

@@ -299,7 +299,7 @@ void LLFloaterAvatarPicker::onList()
RLV_ASSERT( (pTabs) && (pNearMePanel) );
if ( (pTabs) && (pNearMePanel) )
{
bool fRlvEnable = !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES);
bool fRlvEnable = !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) && !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS);
pTabs->enableTabButton(pTabs->getIndexForPanel(pNearMePanel), fRlvEnable);
if ( (!fRlvEnable) && (pTabs->getCurrentPanel() == pNearMePanel) )
pTabs->selectTabByName("SearchPanel");

View File

@@ -124,7 +124,7 @@ void LLFloaterInspect::onClickCreatorProfile()
// LLAvatarActions::showProfile(node->mPermissions->getCreator());
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.2a) | Modified: RLVa-1.0.0e
const LLUUID& idCreator = node->mPermissions->getCreator();
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) &&
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) || gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS)) &&
((node->mPermissions->getOwner() == idCreator) || (RlvUtil::isNearbyAgent(idCreator))) )
{
return;
@@ -157,7 +157,7 @@ void LLFloaterInspect::onClickOwnerProfile()
{
const LLUUID& owner_id = node->mPermissions->getOwner();
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.2a) | Modified: RLVa-1.0.0e
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) || gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS))
return;
// [/RLVa:KB]
LLAvatarActions::showProfile(owner_id);
@@ -172,7 +172,7 @@ void LLFloaterInspect::onSelectObject()
// getChildView("button owner")->setEnabled(true);
// getChildView("button creator")->setEnabled(true);
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.2a) | Modified: RLVa-1.0.0e
getChildView("button owner")->setEnabled(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES));
getChildView("button owner")->setEnabled(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) && !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS));
// TODO-RLVa: [RLVa-1.2.2] Is it worth checking the selected node just to selectively disable this button?
getChildView("button creator")->setEnabled(true);
// [/RLVa:KB]
@@ -241,7 +241,7 @@ void LLFloaterInspect::refresh()
{
// owner_name = av_name.getNSName();
// [RLVa:KB] - Checked: 2010-11-01 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
bool fRlvFilterOwner = (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (idOwner != gAgent.getID()) &&
bool fRlvFilterOwner = (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) || gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS)) && (idOwner != gAgent.getID()) &&
(!obj->mPermissions->isGroupOwned());
owner_name = (!fRlvFilterOwner) ? av_name.getNSName() : RlvStrings::getAnonym(av_name);
// [/RLVa:KB]
@@ -259,7 +259,7 @@ void LLFloaterInspect::refresh()
// last_owner_name = av_name.getNSName();
// [RLVa:LF] - Copied from the above creator check Checked: 2010-11-01 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
LLAvatarNameCache::get(idLastOwner, &av_name);
bool fRlvFilterLastOwner = gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) && idLastOwner != gAgent.getID() &&
bool fRlvFilterLastOwner = (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) || gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS)) && idLastOwner != gAgent.getID() &&
(obj->mPermissions->getOwner() == idLastOwner || RlvUtil::isNearbyAgent(idLastOwner));
last_owner_name = (!fRlvFilterLastOwner) ? av_name.getNSName() : RlvStrings::getAnonym(av_name);
// [/RLVa:LF]
@@ -278,7 +278,7 @@ void LLFloaterInspect::refresh()
// [RLVa:KB] - Checked: 2010-11-01 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
const LLUUID& idCreator = obj->mPermissions->getCreator();
LLAvatarNameCache::get(idCreator, &av_name);
bool fRlvFilterCreator = (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (idCreator != gAgent.getID()) &&
bool fRlvFilterCreator = (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) || gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS)) && (idCreator != gAgent.getID()) &&
( (obj->mPermissions->getOwner() == idCreator) || (RlvUtil::isNearbyAgent(idCreator)) );
creator_name = (!fRlvFilterCreator) ? av_name.getNSName() : RlvStrings::getAnonym(av_name);
// [/RLVa:KB]

View File

@@ -69,7 +69,7 @@ LLFloaterObjectIMInfo::LLFloaterObjectIMInfo(const LLSD& seed)
static void show_avatar_profile(const LLUUID& id)
{
// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RLVa-0.2.0g
if (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) || !RlvUtil::isNearbyAgent(id))
if ((gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) || gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS)) && RlvUtil::isNearbyAgent(id))
return;
// [/RLVa:KB]
LLAvatarActions::showProfile(id);
@@ -114,7 +114,7 @@ void LLFloaterObjectIMInfo::update(const LLSD& data)
// bool my_object = (owner_id == gAgentID);
// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RLVa-0.2.0g
bool my_object = (mOwnerID == gAgentID) || ((gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (RlvUtil::isNearbyAgent(mOwnerID)));
bool my_object = (mOwnerID == gAgentID) || ((gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) || gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS)) && (RlvUtil::isNearbyAgent(mOwnerID)));
// [/RLVa:KB]
childSetEnabled("Mute",!my_object);
@@ -125,7 +125,7 @@ void LLFloaterObjectIMInfo::update(const LLSD& data)
void LLFloaterObjectIMInfo::onClickMute()
{
// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RLVa-0.2.0g
if (!mGroupOwned && gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) && RlvUtil::isNearbyAgent(mOwnerID))
if (!mGroupOwned && (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) || gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS)) && RlvUtil::isNearbyAgent(mOwnerID))
return;
// [/RLVa:KB]
@@ -139,7 +139,7 @@ void LLFloaterObjectIMInfo::nameCallback(const std::string& full_name)
{
childSetText("OwnerName", mName =
// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RLVa-0.2.0g
(!mGroupOwned && gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) && RlvUtil::isNearbyAgent(mOwnerID)) ? RlvStrings::getAnonym(mName) :
(!mGroupOwned && (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) || gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS)) && RlvUtil::isNearbyAgent(mOwnerID)) ? RlvStrings::getAnonym(mName) :
// [/RLVa:KB]
full_name);
}

View File

@@ -327,7 +327,7 @@ void LLGiveInventory::logInventoryOffer(const LLUUID& to_agent, const LLUUID &im
gIMMgr->addSystemMessage(im_session_id, "inventory_item_offered", args);
}
// [RLVa:KB] - Checked: 2010-05-26 (RLVa-1.2.2a) | Modified: RLVa-1.2.0h
else if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (RlvUtil::isNearbyAgent(to_agent)) &&
else if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) || gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS)) && (RlvUtil::isNearbyAgent(to_agent)) &&
(!RlvUIEnabler::hasOpenProfile(to_agent)) )
{
// Log to chat history if the user didn't drop on an IM session or a profile to avoid revealing the name of the recipient

View File

@@ -271,6 +271,8 @@ void LLHoverView::updateText()
line.clear();
if (hit_object->isAvatar())
{
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS))
return; // No tag, no tip.
LLNameValue* title = hit_object->getNVPair("Title");
LLNameValue* firstname = hit_object->getNVPair("FirstName");
LLNameValue* lastname = hit_object->getNVPair("LastName");

View File

@@ -555,7 +555,7 @@ void LLHUDEffectLookAt::render()
gGL.popMatrix();
static LLCachedControl<S32> lookAtNames(gSavedSettings, "LookAtNameSystem", 0);
if (lookAtNames >= 0)
if (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS) && lookAtNames >= 0)
{
std::string text;
if (!LLAvatarNameCache::getNSName(static_cast<LLVOAvatar*>(mSourceObject.get())->getID(), text, lookAtNames)) return;

View File

@@ -273,7 +273,7 @@ void LLHUDText::setString(const std::string &text_utf8)
{
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
RlvUtil::filterLocation(text);
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) || gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS))
RlvUtil::filterNames(text);
}
else

View File

@@ -939,7 +939,8 @@ BOOL LLNetMap::handleToolTip( S32 x, S32 y, std::string& tool_tip, LLRect* stick
{
//tool_tip.append(fullName);
// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e) | Modified: RLVa-0.2.0b
tool_tip.append( (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ? fullName : RlvStrings::getAnonym(fullName) );
if (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS))
tool_tip.append( (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ? fullName : RlvStrings::getAnonym(fullName) );
// [/RLVa:KB]
// <singu> Use the radar for positioning, when possible.

View File

@@ -446,19 +446,36 @@ void LLPanelPermissions::refresh()
if ( (creators_identical) && (mCreatorID != gAgent.getID()) && ((mCreatorID == mOwnerID) || (RlvUtil::isNearbyAgent(mCreatorID))) )
{
creator_name = RlvStrings::getAnonym(creator_name);
fRlvEnableOwner = false;
fRlvEnableCreator = false;
}
// Only anonymize the owner name if all of the selection is owned by the same avie and isn't group owned
if ( (owners_identical) && (!LLSelectMgr::getInstance()->selectIsGroupOwned()) && (mOwnerID != gAgent.getID()) )
{
owner_name = RlvStrings::getAnonym(owner_name);
fRlvEnableCreator = false;
fRlvEnableOwner = false;
}
if (RlvUtil::isNearbyAgent(mLastOwnerID))
{
last_owner_name = RlvStrings::getAnonym(last_owner_name);
fRlvEnableLastOwner = false;
}
}
else if ((objectp->isAttachment() || objectp->isAvatar()) && gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS) && mOwnerID != gAgentID)
{
owner_name = RlvStrings::getAnonym(owner_name);
fRlvEnableOwner = false;
if (mOwnerID == mCreatorID)
{
creator_name = RlvStrings::getAnonym(creator_name);
fRlvEnableCreator = false;
}
if (mOwnerID == mLastOwnerID)
{
last_owner_name = RlvStrings::getAnonym(last_owner_name);
fRlvEnableLastOwner = false;
}
}

View File

@@ -225,7 +225,7 @@ void LLToolBar::refresh()
mBuildBtn->setEnabled(!(gRlvHandler.hasBehaviour(RLV_BHVR_REZ) && gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)));
mMapBtn->setEnabled(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWWORLDMAP));
mRadarBtn->setEnabled(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWMINIMAP) && !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES));
mRadarBtn->setEnabled(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWMINIMAP));
mInventoryBtn->setEnabled(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWINV));
}
// [/RLVa:KB]

View File

@@ -163,7 +163,7 @@ void LLToolGun::draw()
static const LLCachedControl<LLColor4> color("LiruCrosshairColor");
LLColor4 targetColor = color;
targetColor.mV[VALPHA] = 0.5f;
if (show_iff)
if (show_iff && !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWMINIMAP))
{
LLVector3d myPosition = gAgentCamera.getCameraPositionGlobal();
LLQuaternion myRotation = LLViewerCamera::getInstance()->getQuaternion();
@@ -186,13 +186,15 @@ void LLToolGun::draw()
if (magicVector.mdV[VX] > -0.75 && magicVector.mdV[VX] < 0.75 && magicVector.mdV[VZ] > 0.0 && magicVector.mdV[VY] > -1.5 && magicVector.mdV[VY] < 1.5) // Do not fuck with these, cheater. :(
{
LLAvatarName avatarName;
LLAvatarNameCache::get(id, &avatarName);
bool name_restricted = gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES);
bool no_names(gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS));
if (!no_names)
LLAvatarNameCache::get(id, &avatarName);
bool name_restricted = no_names || gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES);
getCustomColorRLV(id, targetColor, world.getRegionFromPosGlobal(targetPosition), name_restricted);
const std::string name(name_restricted ? RlvStrings::getAnonym(avatarName.getNSName()) : avatarName.getNSName());
const std::string name(no_names ? LLStringUtil::null : name_restricted ? RlvStrings::getAnonym(avatarName.getNSName()) : avatarName.getNSName());
targetColor.mV[VALPHA] = 0.5f;
LLFontGL::getFontSansSerifBold()->renderUTF8(
gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC) ? name : llformat("%s : %.2fm", name.c_str(), (targetPosition - myPosition).magVec()),
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
);

View File

@@ -273,7 +273,7 @@ void LLTracker::render3D()
// instance()->mBeaconText, av_tracker.getName() );
// [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a) | Added: RLVa-1.0.0a
renderBeacon( av_tracker.getGlobalPos(), gTrackColor, instance()->mBeaconText,
(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ? av_tracker.getName() : RlvStrings::getString(RLV_STRING_HIDDEN));
(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) && !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS)) ? av_tracker.getName() : RlvStrings::getString(RLV_STRING_HIDDEN));
// [/RLVa:KB]
}
}

View File

@@ -2500,7 +2500,7 @@ bool enable_object_mute()
bool is_self = avatar->isSelf();
// return !is_linden && !is_self;
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Added: RLVa-1.2.1b
return !is_linden && !is_self && !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES);
return !is_linden && !is_self && !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) && !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS);
// [/RLVa:KB]
}
else
@@ -2534,7 +2534,7 @@ class LLObjectMute : public view_listener_t
if (avatar)
{
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Added: RLVa-1.0.0e
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) || gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS))
return true;
// [/RLVa:KB]
id = avatar->getID();
@@ -2955,7 +2955,7 @@ void handle_avatar_freeze(const LLSD& avatar_id)
LLSD args;
// args["AVATAR_NAME"] = fullname;
// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.0.0e
args["AVATAR_NAME"] = (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ? fullname : RlvStrings::getAnonym(fullname);
args["AVATAR_NAME"] = (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) && !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS)) ? fullname : RlvStrings::getAnonym(fullname);
// [/RLVa:KB]
LLNotificationsUtil::add("FreezeAvatarFullname",
args,
@@ -3155,7 +3155,7 @@ void handle_avatar_eject(const LLSD& avatar_id)
LLSD args;
// args["AVATAR_NAME"] = fullname;
// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.0.0e
args["AVATAR_NAME"] = (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ? fullname : RlvStrings::getAnonym(fullname);
args["AVATAR_NAME"] = (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) && !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS)) ? fullname : RlvStrings::getAnonym(fullname);
// [/RLVa:KB]
LLNotificationsUtil::add("EjectAvatarFullname",
args,
@@ -3178,7 +3178,7 @@ void handle_avatar_eject(const LLSD& avatar_id)
LLSD args;
// args["AVATAR_NAME"] = fullname;
// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.0.0e
args["AVATAR_NAME"] = (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ? fullname : RlvStrings::getAnonym(fullname);
args["AVATAR_NAME"] = (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) && !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS)) ? fullname : RlvStrings::getAnonym(fullname);
// [/RLVa:KB]
LLNotificationsUtil::add("EjectAvatarFullnameNoBan",
args,
@@ -3281,7 +3281,7 @@ class LLAvatarGiveCard : public view_listener_t
LLViewerObject* dest = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
// if(dest && dest->isAvatar())
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0d) | Modified: RLVa-1.2.0d | OK
if ( (dest && dest->isAvatar()) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) )
if ( (dest && dest->isAvatar()) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) && !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS)) )
// [/RLVa:KB]
{
bool found_name = false;
@@ -3739,7 +3739,7 @@ class LLAvatarEnableAddFriend : public view_listener_t
LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject());
// bool new_value = avatar && !LLAvatarActions::isFriend(avatar->getID());
// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.0f) | Modified: RLVa-1.2.0f
bool new_value = avatar && !LLAvatarActions::isFriend(avatar->getID()) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES));
bool new_value = avatar && !LLAvatarActions::isFriend(avatar->getID()) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) && !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS));
// [/RLVa:KB]
gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
return true;
@@ -5997,7 +5997,7 @@ class LLAvatarInviteToGroup : public view_listener_t
LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
// if(avatar)
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
if ( (avatar) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) )
if ( (avatar) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) && !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS)) )
// [/RLVa:KB]
{
LLAvatarActions::inviteToGroup(avatar->getID());
@@ -6013,7 +6013,7 @@ class LLAvatarAddFriend : public view_listener_t
LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
// if(avatar && !LLAvatarActions::isFriend(avatar->getID()))
// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.0f) | Modified: RLVa-1.2.0f
if ( (avatar && !LLAvatarActions::isFriend(avatar->getID())) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) )
if ( (avatar && !LLAvatarActions::isFriend(avatar->getID())) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) && !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS)) )
// [/RLVa:KB]
{
request_friendship(avatar->getID());
@@ -6089,7 +6089,7 @@ bool enable_pay_avatar()
LLVOAvatar* avatar = find_avatar_from_object(obj);
// return (avatar != NULL);
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Added: RLVa-1.2.1b
return (avatar != NULL) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES));
return (avatar != NULL) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) && !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS));
// [/RLVa:KB]
}
@@ -6357,7 +6357,7 @@ class LLShowAgentProfile : public view_listener_t
LLVOAvatar* avatar = find_avatar_from_object(agent_id);
// if (avatar)
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0d) | Modified: RLVa-1.2.0d
if ( (avatar) && ((!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) || (gAgent.getID() == agent_id)) )
if ( (avatar) && ((!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) && !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS)) || (gAgent.getID() == agent_id)) )
// [/RLVa:KB]
{
LLAvatarActions::showProfile(avatar->getID());
@@ -7013,7 +7013,7 @@ class LLAvatarSendIM : public view_listener_t
LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
// if(avatar)
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
if ((avatar) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)))
if ((avatar) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) && !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS)))
// [/RLVa:KB]
{
LLAvatarActions::startIM(avatar->getID());

View File

@@ -3060,7 +3060,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
if (rlv_handler_t::isEnabled())
{
// NOTE: the chat message itself will be filtered in LLNearbyChatHandler::processChat()
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (!from_group) && (RlvUtil::isNearbyAgent(from_id)) )
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) || gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS)) && (!from_group) && (RlvUtil::isNearbyAgent(from_id)) )
{
query_string["rlv_shownames"] = TRUE;
@@ -7734,6 +7734,7 @@ void send_lures(const LLSD& notification, const LLSD& response)
text.append("\r\n").append(slurl.getSLURLString());
// [RLVa:KB] - Checked: 2010-11-30 (RLVa-1.3.0)
const std::string& rlv_hidden(RlvStrings::getString(RLV_STRING_HIDDEN));
if ( (RlvActions::hasBehaviour(RLV_BHVR_SENDIM)) || (RlvActions::hasBehaviour(RLV_BHVR_SENDIMTO)) )
{
// Filter the lure message if one of the recipients of the lure can't be sent an IM to
@@ -7742,7 +7743,7 @@ void send_lures(const LLSD& notification, const LLSD& response)
{
if (!RlvActions::canSendIM(it->asUUID()))
{
text = RlvStrings::getString(RLV_STRING_HIDDEN);
text = rlv_hidden;
break;
}
}
@@ -7757,6 +7758,10 @@ void send_lures(const LLSD& notification, const LLSD& response)
msg->nextBlockFast(_PREHASH_Info);
msg->addU8Fast(_PREHASH_LureType, (U8)0); // sim will fill this in.
msg->addStringFast(_PREHASH_Message, text);
// [RLVa:KB] - Checked: 2014-03-31 (Catznip-3.6)
bool fRlvHideName = gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES);
bool fRlvNoNearbyNames = gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS);
// [/RLVa:KB]
for(LLSD::array_const_iterator it = notification["payload"]["ids"].beginArray();
it != notification["payload"]["ids"].endArray();
++it)
@@ -7770,13 +7775,15 @@ void send_lures(const LLSD& notification, const LLSD& response)
if (notification["payload"]["ids"].size() < 10) // Singu Note: Do NOT spam chat!
{
// [RLVa:KB] - Checked: 2014-03-31 (Catznip-3.6)
bool fRlvHideName = notification["payload"]["rlv_shownames"].asBoolean();
fRlvHideName |= notification["payload"]["rlv_shownames"].asBoolean();
// [/RLVa:KB]
std::string target_name;
gCacheName->getFullName(target_id, target_name); // for im log filenames
LLSD args;
// [RLVa:KB] - Checked: 2014-03-31 (Catznip-3.6)
if (fRlvHideName)
if (fRlvNoNearbyNames && RlvUtil::isNearbyAgent(target_id))
target_name = rlv_hidden;
else if (fRlvHideName)
target_name = RlvStrings::getAnonym(target_name);
else
// [/RLVa:KB]

View File

@@ -2593,6 +2593,11 @@ void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled)
render_visualizer = false;
}
}
else if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS)) // RLVa:LF - You get nothing now!
{
render_visualizer = false;
}
mVoiceVisualizer->setVoiceEnabled(render_visualizer);
@@ -3072,6 +3077,8 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
static const LLCachedControl<bool> render_name_hide_self("RenderNameHideSelf",false);
static const LLCachedControl<bool> allow_nameplate_override ("CCSAllowNameplateOverride", true);
// [RLVa:KB] - Checked: 2010-04-04 (RLVa-1.2.2a) | Added: RLVa-0.2.0b
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS))
return; // No tags
bool fRlvShowNames = gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES);
// [/RLVa:KB]
BOOL visible_avatar = isVisible() || mNeedsAnimUpdate;
@@ -3274,6 +3281,8 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name)
if (!firstname || !lastname) return;
// [RLVa:KB] - Checked: 2010-10-31 (RLVa-1.2.2a) | Added: RLVa-1.2.2a
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS))
return; // No tags
bool fRlvShowNames = gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES);
// [/RLVa:KB]
bool is_away = mSignaledAnimations.find(ANIM_AGENT_AWAY) != mSignaledAnimations.end();

View File

@@ -35,6 +35,7 @@
#include "llnotificationsutil.h"
#include "llsdserialize.h"
#include "llkeyboard.h"
#include "rlvhandler.h"
const F32 LLVoiceClient::OVERDRIVEN_POWER_LEVEL = 0.7f;
@@ -526,6 +527,8 @@ void LLVoiceClient::setLipSyncEnabled(BOOL enabled)
BOOL LLVoiceClient::lipSyncEnabled()
{
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS)) return false; // RLVa:LF - You get nothing now!
if (mVoiceModule)
{
return mVoiceModule->lipSyncEnabled();

View File

@@ -151,6 +151,7 @@ enum ERlvBehaviour {
RLV_BHVR_SHOWWORLDMAP, // "showworldmap"
RLV_BHVR_SHOWLOC, // "showloc"
RLV_BHVR_SHOWNAMES, // "shownames"
RLV_BHVR_SHOWNAMETAGS, // "shownametags"
RLV_BHVR_SHOWHOVERTEXT, // "showhovertext"
RLV_BHVR_SHOWHOVERTEXTHUD, // "showhovertexthud"
RLV_BHVR_SHOWHOVERTEXTWORLD, // "showhovertextworld"

View File

@@ -1301,6 +1301,7 @@ ERlvCmdRet RlvHandler::processAddRemCommand(const RlvCommand& rlvCmd)
// The following block is only valid if there's no option
case RLV_BHVR_SHOWLOC: // @showloc=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h
case RLV_BHVR_SHOWNAMES: // @shownames=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h
case RLV_BHVR_SHOWNAMETAGS: // @shownametags=n|y - Checked: 2015-05-20 (RLVa:LF)
case RLV_BHVR_EMOTE: // @emote=n|y - Checked: 2010-03-26 (RLVa-1.2.0b)
case RLV_BHVR_SENDCHAT: // @sendchat=n|y - Checked: 2010-03-26 (RLVa-1.2.0b)
case RLV_BHVR_CHATWHISPER: // @chatwhisper=n|y - Checked: 2010-03-26 (RLVa-1.2.0b)

View File

@@ -163,7 +163,7 @@ void RlvCommand::initLookupTable()
"unsharedwear", "unsharedunwear", "emote", "sendchat", "recvchat", "recvchatfrom", "recvemote", "recvemotefrom",
"redirchat", "rediremote", "chatwhisper", "chatnormal", "chatshout", "sendchannel", "sendim", "sendimto",
"recvim", "recvimfrom", "startim", "startimto", "permissive", "notify", "showinv", "showminimap", "showworldmap", "showloc",
"shownames", "showhovertext", "showhovertexthud", "showhovertextworld", "showhovertextall", "tplm", "tploc", "tplure", "tprequest",
"shownames", "shownametags", "showhovertext", "showhovertexthud", "showhovertextworld", "showhovertextall", "tplm", "tploc", "tplure", "tprequest",
"viewnote", "viewscript", "viewtexture", "acceptpermission", "accepttp", "accepttprequest", "allowidle", "edit", "editobj", "rez",
"fartouch", "interact", "touchthis", "touchattach", "touchattachself", "touchattachother", "touchhud", "touchworld", "touchall",
"touchme", "fly", "setgroup", "unsit", "sit", "sittp", "standtp", "setdebug", "setenv", "alwaysrun", "temprun", "detachme",

View File

@@ -67,6 +67,7 @@ RlvUIEnabler::RlvUIEnabler()
// onRefreshHoverText()
m_Handlers.insert(std::pair<ERlvBehaviour, behaviour_handler_t>(RLV_BHVR_SHOWLOC, boost::bind(&RlvUIEnabler::onRefreshHoverText, this)));
m_Handlers.insert(std::pair<ERlvBehaviour, behaviour_handler_t>(RLV_BHVR_SHOWNAMES, boost::bind(&RlvUIEnabler::onRefreshHoverText, this)));
m_Handlers.insert(std::pair<ERlvBehaviour, behaviour_handler_t>(RLV_BHVR_SHOWNAMETAGS, boost::bind(&RlvUIEnabler::onRefreshHoverText, this)));
m_Handlers.insert(std::pair<ERlvBehaviour, behaviour_handler_t>(RLV_BHVR_SHOWHOVERTEXTALL, boost::bind(&RlvUIEnabler::onRefreshHoverText, this)));
m_Handlers.insert(std::pair<ERlvBehaviour, behaviour_handler_t>(RLV_BHVR_SHOWHOVERTEXTWORLD, boost::bind(&RlvUIEnabler::onRefreshHoverText, this)));
m_Handlers.insert(std::pair<ERlvBehaviour, behaviour_handler_t>(RLV_BHVR_SHOWHOVERTEXTHUD, boost::bind(&RlvUIEnabler::onRefreshHoverText, this)));
@@ -90,6 +91,7 @@ RlvUIEnabler::RlvUIEnabler()
m_Handlers.insert(std::pair<ERlvBehaviour, behaviour_handler_t>(RLV_BHVR_SHOWLOC, boost::bind(&RlvUIEnabler::onToggleShowLoc, this)));
m_Handlers.insert(std::pair<ERlvBehaviour, behaviour_handler_t>(RLV_BHVR_SHOWMINIMAP, boost::bind(&RlvUIEnabler::onToggleShowMinimap, this)));
m_Handlers.insert(std::pair<ERlvBehaviour, behaviour_handler_t>(RLV_BHVR_SHOWNAMES, boost::bind(&RlvUIEnabler::onToggleShowNames, this, _1)));
m_Handlers.insert(std::pair<ERlvBehaviour, behaviour_handler_t>(RLV_BHVR_SHOWNAMETAGS, boost::bind(&RlvUIEnabler::onToggleShowNameTags, this, _1)));
m_Handlers.insert(std::pair<ERlvBehaviour, behaviour_handler_t>(RLV_BHVR_SHOWWORLDMAP, boost::bind(&RlvUIEnabler::onToggleShowWorldMap, this)));
m_Handlers.insert(std::pair<ERlvBehaviour, behaviour_handler_t>(RLV_BHVR_UNSIT, boost::bind(&RlvUIEnabler::onToggleUnsit, this)));
@@ -305,9 +307,7 @@ void RlvUIEnabler::onToggleShowNames(bool fQuitting)
{
// Close the "Active Speakers" panel if it's currently visible
LLFloaterChat::getInstance()->childSetVisible("active_speakers_panel", false);
// Close the "Avatar List/Radar" floater if it's currently visible
if (LLFloaterAvatarList::instanceVisible())
LLFloaterAvatarList::toggleInstance();
LLAvatarNameCache::setForceDisplayNames(true);
}
else
@@ -316,6 +316,23 @@ void RlvUIEnabler::onToggleShowNames(bool fQuitting)
const S32 namesys = gSavedSettings.getS32("PhoenixNameSystem");
LLAvatarNameCache::setUseDisplayNames(namesys > 0 && namesys < 4);
}
// Reset the names in radar, if it exists
if (LLFloaterAvatarList::instanceExists())
LLFloaterAvatarList::instance().resetAvatarNames();
LLVOAvatar::invalidateNameTags(); // See handleDisplayNamesOptionChanged()
}
// Checked: 2015-05-20 (RLVa:LF)
void RlvUIEnabler::onToggleShowNameTags(bool fQuitting)
{
if (fQuitting) return; // Nothing to do if the viewer is shutting down
// Reset the names in radar, if it exists
if (LLFloaterAvatarList::instanceExists())
LLFloaterAvatarList::instance().resetAvatarNames();
LLVOAvatar::invalidateNameTags(); // See handleDisplayNamesOptionChanged()
}

View File

@@ -52,6 +52,7 @@ protected:
void onToggleShowLoc(); // showloc
void onToggleShowMinimap(); // showminimap
void onToggleShowNames(bool fQuitting); // shownames
void onToggleShowNameTags(bool fQuitting); // shownametags
void onToggleShowWorldMap(); // showworldmap
void onToggleTp(); // tploc and tplm
void onToggleUnsit(); // unsit