Removed old RLV code. Plugged holes with RLVa.

This commit is contained in:
Shyotl
2011-08-14 02:33:57 -05:00
parent 88df625096
commit 1c38d016d5
8 changed files with 60 additions and 108 deletions

View File

@@ -59,6 +59,10 @@
#include "llviewermenu.h"
//</edit>
// [RLVa:KB]
#include "rlvhandler.h"
// [/RLVa:KB]
/**
* @brief How long to keep people who are gone in the list and in memory.
*/
@@ -237,18 +241,14 @@ void LLFloaterAvatarList::createInstance(bool visible)
//static
void LLFloaterAvatarList::toggle(void*)
{
#ifdef LL_RRINTERFACE_H //MK
if (gRRenabled && gAgent.mRRInterface.mContainsShownames)
{
if (sInstance && sInstance->getVisible())
{
sInstance->close(false);
}
}
#endif //mk
if (sInstance)
{
if (sInstance->getVisible())
if (sInstance->getVisible()
// [RLVa:KB]
|| gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)
// [/RLVa:KB]
)
{
sInstance->close(false);
}
@@ -266,12 +266,10 @@ void LLFloaterAvatarList::toggle(void*)
//static
void LLFloaterAvatarList::showInstance()
{
#ifdef LL_RRINTERFACE_H //MK
if (gRRenabled && gAgent.mRRInterface.mContainsShownames)
{
// [RLVa:KB]
if(gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
return;
}
#endif //mk
// [/RLVa:KB]
if (sInstance)
{
if (!sInstance->getVisible())
@@ -457,12 +455,6 @@ void LLFloaterAvatarList::updateAvatarList()
continue;
}
}
#ifdef LL_RRINTERFACE_H //MK
if (gRRenabled && gAgent.mRRInterface.mContainsShownames)
{
name = gAgent.mRRInterface.getDummyName(name);
}
#endif //mk
if (avid.isNull())
{
@@ -501,12 +493,6 @@ void LLFloaterAvatarList::updateAvatarList()
//name = gCacheName->getDefaultName();
continue; //prevent (Loading...)
}
#ifdef LL_RRINTERFACE_H //MK
if (gRRenabled && gAgent.mRRInterface.mContainsShownames)
{
name = gAgent.mRRInterface.getDummyName(name);
}
#endif //mk
if (mAvatars.count(avid) > 0)
{

View File

@@ -52,6 +52,9 @@
#include "llviewerwindow.h"
#include "llweb.h"
#include "llsdserialize.h"
// [RLVa:KB]
#include "rlvhandler.h"
// [/RLVa:KB]
LLFloaterTeleportHistory::LLFloaterTeleportHistory(const LLSD& seed)
: LLFloater(std::string("teleporthistory")),
@@ -103,12 +106,11 @@ BOOL LLFloaterTeleportHistory::postBuild()
void LLFloaterTeleportHistory::addPendingEntry(std::string regionName, S16 x, S16 y, S16 z)
{
#ifdef LL_RRINTERFACE_H //MK
if (gRRenabled && gAgent.mRRInterface.mContainsShowloc)
{
// [RLVa:KB]
if(gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
return;
}
#endif //mk
// [/RLVa:KB]
// Set pending entry timestamp
U32 utc_time;

View File

@@ -4119,13 +4119,10 @@ void LLObjectBridge::openItem()
}
if (avatar->isWearingAttachment(mUUID))
{
#ifdef LL_RRINTERFACE_H //MK
if (gRRenabled && !gAgent.mRRInterface.canDetach(avatar->getWornAttachment(mUUID)))
{
return;
}
#endif //mk
performAction(NULL, NULL, "detach");
// [RLVa:KB]
if ( !(rlv_handler_t::isEnabled()) || (gRlvAttachmentLocks.canDetach(getItem())))
performAction(NULL, NULL, "detach");
// [/RLVa:KB]
}
else
{

View File

@@ -638,33 +638,22 @@ BOOL LLNetMap::handleToolTip( S32 x, S32 y, std::string& msg, LLRect* sticky_rec
}
else
{
#ifdef LL_RRINTERFACE_H //MK
if (gRRenabled && gAgent.mRRInterface.mContainsShownames)
if (LLAvatarNameCache::useDisplayNames())
{
fullname = gAgent.mRRInterface.getDummyName(fullname);
}
else
{
#endif //mk
if (LLAvatarNameCache::useDisplayNames())
{
LLAvatarName avatar_name;
if (LLAvatarNameCache::get(mClosestAgentToCursor, &avatar_name))
{
static const LLCachedControl<S32> phoenix_name_system("PhoenixNameSystem", 0);
if (phoenix_name_system == 2 || (phoenix_name_system == 1 && avatar_name.mIsDisplayNameDefault))
{
fullname = avatar_name.mDisplayName;
}
else
{
fullname = avatar_name.getCompleteName(true);
}
}
}
#ifdef LL_RRINTERFACE_H //MK
}
#endif //mk
LLAvatarName avatar_name;
if (LLAvatarNameCache::get(mClosestAgentToCursor, &avatar_name))
{
static const LLCachedControl<S32> phoenix_name_system("PhoenixNameSystem", 0);
if (phoenix_name_system == 2 || (phoenix_name_system == 1 && avatar_name.mIsDisplayNameDefault))
{
fullname = avatar_name.mDisplayName;
}
else
{
fullname = avatar_name.getCompleteName(true);
}
}
}
msg.append(fullname);
}
// [/Ansariel: Display name support]

View File

@@ -2646,9 +2646,6 @@ bool idle_startup()
gForegroundTime.reset();
if (gSavedSettings.getBOOL("FetchInventoryOnLogin")
#ifdef LL_RRINTERFACE_H //MK
|| gRRenabled
#endif //mk
)
{
// Fetch inventory in the background

View File

@@ -477,11 +477,6 @@ void LLToolBar::onClickAppearance(void*)
void LLToolBar::onClickRadarList(void*)
{
LLFloaterAvatarList::toggle(0);
bool vis = false;
if(LLFloaterAvatarList::getInstance())
{
vis = (bool)LLFloaterAvatarList::getInstance()->getVisible();
}
}

View File

@@ -2773,9 +2773,6 @@ bool handle_go_to()
std::string val;
LLVector3d pos = LLToolPie::getInstance()->getPick().mPosGlobal;
if (gSavedSettings.getBOOL("DoubleClickTeleport")
#ifdef LL_RRINTERFACE_H //MK
&& !(gRRenabled && gAgent.mRRInterface.contains ("tploc"))
#endif //mk
)
{
LLVector3d hips_offset(0.0f, 0.0f, 1.2f);
@@ -5637,11 +5634,6 @@ class LLViewToggleRadar: public view_listener_t
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
LLFloaterAvatarList::toggle(0);
bool vis = false;
if(LLFloaterAvatarList::getInstance())
{
vis = (bool)LLFloaterAvatarList::getInstance()->getVisible();
}
return true;
}
};

View File

@@ -3113,18 +3113,20 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
U32 links_for_chatting_objects = gSavedSettings.getU32("LinksForChattingObjects");
if (links_for_chatting_objects != 0 && chatter && chat.mSourceType == CHAT_SOURCE_OBJECT &&
#ifdef LL_RRINTERFACE_H //MK
(!gRRenabled || !gAgent.mRRInterface.mContainsShownames) &&
#endif //mk
(!is_owned_by_me || links_for_chatting_objects == 2))
(!is_owned_by_me || links_for_chatting_objects == 2)
// [RLVa:KB]
&& !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)
// [/RLVa:KB]
)
{
LLSD query_string;
query_string["name"] = from_name;
query_string["owner"] = owner_id;
#ifdef LL_RRINTERFACE_H //MK
if (!gRRenabled || !gAgent.mRRInterface.mContainsShowloc)
// [RLVa:KB]
if( !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC) )
// [/RLVa:KB]
{
#endif //mk
// Compute the object SLURL.
LLVector3 pos = chatter->getPositionRegion();
S32 x = llround((F32)fmod((F64)pos.mV[VX], (F64)REGION_WIDTH_METERS));
@@ -3133,9 +3135,8 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
std::ostringstream location;
location << chatter->getRegion()->getName() << "/" << x << "/" << y << "/" << z;
query_string["slurl"] = location.str();
#ifdef LL_RRINTERFACE_H //MK
}
#endif //mk
std::ostringstream link;
link << "secondlife:///app/objectim/" << from_id << LLURI::mapToQueryString(query_string);
chat.mURL = link.str();
@@ -3199,30 +3200,23 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
// [Ansariel/Henri: Display name support]
if (chatter && chatter->isAvatar())
{
#ifdef LL_RRINTERFACE_H //MK
if (!gRRenabled || !gAgent.mRRInterface.mContainsShownames)
if (LLAvatarNameCache::useDisplayNames())
{
#endif //mk
if (LLAvatarNameCache::useDisplayNames())
LLAvatarName avatar_name;
if (LLAvatarNameCache::get(from_id, &avatar_name))
{
LLAvatarName avatar_name;
if (LLAvatarNameCache::get(from_id, &avatar_name))
static const LLCachedControl<S32> phoenix_name_system("PhoenixNameSystem", 0);
if (phoenix_name_system == 2 || (phoenix_name_system == 1 && avatar_name.mIsDisplayNameDefault))
{
static const LLCachedControl<S32> phoenix_name_system("PhoenixNameSystem", 0);
if (phoenix_name_system == 2 || (phoenix_name_system == 1 && avatar_name.mIsDisplayNameDefault))
{
from_name = avatar_name.mDisplayName;
}
else
{
from_name = avatar_name.getCompleteName();
}
from_name = avatar_name.mDisplayName;
}
else
{
from_name = avatar_name.getCompleteName();
}
chat.mFromName = from_name;
}
#ifdef LL_RRINTERFACE_H //MK
chat.mFromName = from_name;
}
#endif //mk
}
// [/Ansariel/Henri: Display name support]