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

View File

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

View File

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

View File

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

View File

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

View File

@@ -477,11 +477,6 @@ void LLToolBar::onClickAppearance(void*)
void LLToolBar::onClickRadarList(void*) void LLToolBar::onClickRadarList(void*)
{ {
LLFloaterAvatarList::toggle(0); 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; std::string val;
LLVector3d pos = LLToolPie::getInstance()->getPick().mPosGlobal; LLVector3d pos = LLToolPie::getInstance()->getPick().mPosGlobal;
if (gSavedSettings.getBOOL("DoubleClickTeleport") 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); 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) bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{ {
LLFloaterAvatarList::toggle(0); LLFloaterAvatarList::toggle(0);
bool vis = false;
if(LLFloaterAvatarList::getInstance())
{
vis = (bool)LLFloaterAvatarList::getInstance()->getVisible();
}
return true; 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"); U32 links_for_chatting_objects = gSavedSettings.getU32("LinksForChattingObjects");
if (links_for_chatting_objects != 0 && chatter && chat.mSourceType == CHAT_SOURCE_OBJECT && if (links_for_chatting_objects != 0 && chatter && chat.mSourceType == CHAT_SOURCE_OBJECT &&
#ifdef LL_RRINTERFACE_H //MK (!is_owned_by_me || links_for_chatting_objects == 2)
(!gRRenabled || !gAgent.mRRInterface.mContainsShownames) && // [RLVa:KB]
#endif //mk && !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)
(!is_owned_by_me || links_for_chatting_objects == 2)) // [/RLVa:KB]
)
{ {
LLSD query_string; LLSD query_string;
query_string["name"] = from_name; query_string["name"] = from_name;
query_string["owner"] = owner_id; 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. // Compute the object SLURL.
LLVector3 pos = chatter->getPositionRegion(); LLVector3 pos = chatter->getPositionRegion();
S32 x = llround((F32)fmod((F64)pos.mV[VX], (F64)REGION_WIDTH_METERS)); 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; std::ostringstream location;
location << chatter->getRegion()->getName() << "/" << x << "/" << y << "/" << z; location << chatter->getRegion()->getName() << "/" << x << "/" << y << "/" << z;
query_string["slurl"] = location.str(); query_string["slurl"] = location.str();
#ifdef LL_RRINTERFACE_H //MK
} }
#endif //mk
std::ostringstream link; std::ostringstream link;
link << "secondlife:///app/objectim/" << from_id << LLURI::mapToQueryString(query_string); link << "secondlife:///app/objectim/" << from_id << LLURI::mapToQueryString(query_string);
chat.mURL = link.str(); chat.mURL = link.str();
@@ -3199,30 +3200,23 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
// [Ansariel/Henri: Display name support] // [Ansariel/Henri: Display name support]
if (chatter && chatter->isAvatar()) if (chatter && chatter->isAvatar())
{ {
#ifdef LL_RRINTERFACE_H //MK if (LLAvatarNameCache::useDisplayNames())
if (!gRRenabled || !gAgent.mRRInterface.mContainsShownames)
{ {
#endif //mk LLAvatarName avatar_name;
if (LLAvatarNameCache::useDisplayNames()) if (LLAvatarNameCache::get(from_id, &avatar_name))
{ {
LLAvatarName avatar_name; static const LLCachedControl<S32> phoenix_name_system("PhoenixNameSystem", 0);
if (LLAvatarNameCache::get(from_id, &avatar_name)) if (phoenix_name_system == 2 || (phoenix_name_system == 1 && avatar_name.mIsDisplayNameDefault))
{ {
static const LLCachedControl<S32> phoenix_name_system("PhoenixNameSystem", 0); from_name = avatar_name.mDisplayName;
if (phoenix_name_system == 2 || (phoenix_name_system == 1 && avatar_name.mIsDisplayNameDefault)) }
{ else
from_name = avatar_name.mDisplayName; {
} from_name = avatar_name.getCompleteName();
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] // [/Ansariel/Henri: Display name support]