Merged with default tip (Revision aeb7e6c38341)

--HG--
branch : RLVa
master
Kitty Barnett 2010-10-31 23:41:40 +01:00
commit 9498c31d3c
134 changed files with 13285 additions and 285 deletions

1
.hgpatchinfo/RLVa.dep Normal file
View File

@ -0,0 +1 @@
dc4e4cc3b9f3a313e19480bac7c6d37309919f39

View File

@ -37,6 +37,7 @@ b0cd7e150009809a0b5b0a9d5785cd4bb230413a 2.2.0-beta3
98e0d6df638429fd2f0476667504bd5a6b298def 2.3.0-beta1
1415e6538d54fd5d568ee88343424d57c6803c2c 2.2.0-release
98e0d6df638429fd2f0476667504bd5a6b298def 2.3.0-start
425f96b1e81e01644bf5e951961e7d1023bffb89 RLVa-1.2.0
0000000000000000000000000000000000000000 2.1.1-release
0000000000000000000000000000000000000000 v2start
0000000000000000000000000000000000000000 2-1rn1

View File

@ -80,6 +80,10 @@ public:
mChatType(CHAT_TYPE_NORMAL),
mAudible(CHAT_AUDIBLE_FULLY),
mMuted(FALSE),
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f) | Modified: RLVa-1.0.0a
mRlvLocFiltered(FALSE),
mRlvNamesFiltered(FALSE),
// [/RLVa:KB]
mTime(0.0),
mTimeStr(),
mPosAgent(),
@ -97,6 +101,10 @@ public:
EChatType mChatType;
EChatAudible mAudible;
BOOL mMuted; // pass muted chat to maintain list of chatters
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f) | Modified: RLVa-1.0.0a
BOOL mRlvLocFiltered;
BOOL mRlvNamesFiltered;
// [/RLVa:KB]
F64 mTime; // viewer only, seconds from viewer start
std::string mTimeStr;
LLVector3 mPosAgent;

View File

@ -45,6 +45,10 @@ std::set<std::string> LLFloaterReg::sAlwaysShowableList;
static LLFloaterRegListener sFloaterRegListener;
// [RLVa:KB] - Checked: 2010-02-28 (RLVa-1.2.0a) | Modified: RLVa-1.2.0a
LLFloaterReg::validate_signal_t LLFloaterReg::mValidateSignal;
// [/RLVa:KB]
//*******************************************************
//static
@ -214,9 +218,12 @@ LLFloaterReg::const_instance_list_t& LLFloaterReg::getFloaterList(const std::str
//static
LLFloater* LLFloaterReg::showInstance(const std::string& name, const LLSD& key, BOOL focus)
{
if( sBlockShowFloaters
// see EXT-7090
&& sAlwaysShowableList.find(name) == sAlwaysShowableList.end())
// if( sBlockShowFloaters
// // see EXT-7090
// && sAlwaysShowableList.find(name) == sAlwaysShowableList.end())
// [RLVa:KB] - Checked: 2010-02-28 (RLVa-1.2.0a) | Modified: RLVa-1.2.0a
if ( (sBlockShowFloaters && sAlwaysShowableList.find(name) == sAlwaysShowableList.end()) || (!mValidateSignal(name, key)) )
// [/RLVa:KB]
return 0;//
LLFloater* instance = getInstance(name, key);
if (instance)

View File

@ -75,6 +75,15 @@ private:
*/
static std::set<std::string> sAlwaysShowableList;
// [RLVa:KB] - Checked: 2010-02-28 (RLVa-1.2.0a) | Modified: RLVa-1.2.0a
// Used to determine whether a floater can be shown
public:
typedef boost::signals2::signal<bool(const std::string&, const LLSD&), boost_boolean_combiner> validate_signal_t;
static boost::signals2::connection setValidateCallback(const validate_signal_t::slot_type& cb) { return mValidateSignal.connect(cb); }
private:
static validate_signal_t mValidateSignal;
// [/RLVa:KB]
public:
// Registration

View File

@ -575,6 +575,14 @@ set(viewer_SOURCE_FILES
llxmlrpctransaction.cpp
noise.cpp
pipeline.cpp
rlvhandler.cpp
rlvhelper.cpp
rlvcommon.cpp
rlvlocks.cpp
rlvinventory.cpp
rlvextensions.cpp
rlvfloaters.cpp
rlvui.cpp
)
set(VIEWER_BINARY_NAME "secondlife-bin" CACHE STRING
@ -1104,6 +1112,15 @@ set(viewer_HEADER_FILES
macmain.h
noise.h
pipeline.h
rlvdefines.h
rlvhandler.h
rlvhelper.h
rlvcommon.h
rlvlocks.h
rlvinventory.h
rlvextensions.h
rlvfloaters.h
rlvui.h
VertexCache.h
VorbisFramework.h
)

View File

@ -1,6 +1,171 @@
<?xml version="1.0" ?>
<llsd>
<map>
<key>RestrainedLove</key>
<map>
<key>Comment</key>
<string>Toggles the RestrainedLove features (BDSM lockable toys support). Needs a restart of the viewer.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>RestrainedLoveDebug</key>
<map>
<key>Comment</key>
<string>Toggles the RestrainedLove debug mode (displays the commands when in debug mode).</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>RestrainedLoveNoSetEnv</key>
<map>
<key>Comment</key>
<string>When TRUE, forbids to set the environment (time of day and Windlight settings) via RestrainedLove. Needs a restart of the viewer.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>RestrainedLoveForbidGiveToRLV</key>
<map>
<key>Comment</key>
<string>When TRUE, forbids to give sub-folders to the #RLV RestrainedLove folder.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>RestrainedLoveReplaceWhenFolderBeginsWith</key>
<map>
<key>Comment</key>
<string>If a folder name begins with this string, its attach behavior will always be "replace", never "stack". Default is blank (disabled).</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string></string>
</map>
<key>RestrainedLoveStackWhenFolderBeginsWith</key>
<map>
<key>Comment</key>
<string>If a folder name begins with this string, its attach behavior will always be "stack", never "replace". Default is "+".</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>+</string>
</map>
<key>RLVaDebugHideUnsetDuplicate</key>
<map>
<key>Comment</key>
<string>Suppresses reporting "unset" or "duplicate" command restrictions when RestrainedLoveDebug is TRUE</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>RLVaEnableCompositeFolders</key>
<map>
<key>Comment</key>
<string>Enables composite folders for shared inventory</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>RLVaEnableLegacyNaming</key>
<map>
<key>Comment</key>
<string>Enables legacy naming convention for folders</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>RLVaEnableSharedWear</key>
<map>
<key>Comment</key>
<string>Attachments in the shared #RLV folder can be force-attached without needing to specify an attachment point</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>RLVaHideLockedLayers</key>
<map>
<key>Comment</key>
<string>Hides "remove outfit" restricted worn clothing layers from @getoufit</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>RLVaHideLockedAttachments</key>
<map>
<key>Comment</key>
<string>Hides non-detachable worn attachments from @getattach</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>RLVaSharedInvAutoRename</key>
<map>
<key>Comment</key>
<string>Automatically renames shared inventory items when worn</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>RLVaShowNameTags</key>
<map>
<key>Comment</key>
<string>Display of names above avatars is subject to the general "Show Names" setting when @shownames=n restricted</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>WarnFirstRLVGiveToRLV</key>
<map>
<key>Comment</key>
<string>Enables FirstRLVGiveToRLV warning dialog</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>CrashHostUrl</key>
<map>
<key>Comment</key>

View File

@ -1,6 +1,17 @@
<llsd>
<map>
<key>BusyResponseChanged</key>
<key>RLVaLoginLastLocation</key>
<map>
<key>Comment</key>
<string>Determines whether the next login will be forced to the last logoff location (set by the viewer)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>BusyResponseChanged</key>
<map>
<key>Comment</key>
<string>Does user's busy mode message differ from default?</string>

View File

@ -76,6 +76,10 @@
#include "llwindow.h"
#include "llworld.h"
#include "llworldmap.h"
// [RLVa:KB] - Checked: 2010-03-07 (RLVa-1.2.0c)
#include "rlvhandler.h"
#include "rlvui.h"
// [/RLVa:KB]
using namespace LLVOAvatarDefines;
@ -469,6 +473,9 @@ void LLAgent::movePitch(F32 mag)
// Does this parcel allow you to fly?
BOOL LLAgent::canFly()
{
// [RLVa:KB] - Checked: 2010-03-02 (RLVa-1.2.0d) | Modified: RLVa-1.0.0c
if (gRlvHandler.hasBehaviour(RLV_BHVR_FLY)) return FALSE;
// [/RLVa:KB]
if (isGodlike()) return TRUE;
LLViewerRegion* regionp = getRegion();
@ -517,6 +524,13 @@ void LLAgent::setFlying(BOOL fly)
if (fly)
{
// [RLVa:KB] - Checked: 2010-03-02 (RLVa-1.2.0d) | Modified: RLVa-1.0.0c
if (gRlvHandler.hasBehaviour(RLV_BHVR_FLY))
{
return;
}
// [/RLVa:KB]
BOOL was_flying = getFlying();
if (!canFly() && !was_flying)
{
@ -574,7 +588,14 @@ bool LLAgent::enableFlying()
void LLAgent::standUp()
{
setControlFlags(AGENT_CONTROL_STAND_UP);
// setControlFlags(AGENT_CONTROL_STAND_UP);
// [RLVa:KB] - Checked: 2010-03-07 (RLVa-1.2.0c) | Added: RLVa-1.2.0a
// RELEASE-RLVa: [SL-2.0.0] Check this function's callers since usually they require explicit blocking
if ( (!rlv_handler_t::isEnabled()) || (gRlvHandler.canStand()) )
{
setControlFlags(AGENT_CONTROL_STAND_UP);
}
// [/RLVa:KB]
}
@ -850,7 +871,14 @@ LLVector3d LLAgent::getPosGlobalFromAgent(const LLVector3 &pos_agent) const
void LLAgent::sitDown()
{
setControlFlags(AGENT_CONTROL_SIT_ON_GROUND);
// setControlFlags(AGENT_CONTROL_SIT_ON_GROUND);
// [RLVa:KB] - Checked: 2010-08-28 (RLVa-1.2.1a) | Added: RLVa-1.2.1a
// RELEASE-RLVa: [SL-2.0.0] Check this function's callers since usually they require explicit blocking
if ( (!rlv_handler_t::isEnabled()) || ((gRlvHandler.canStand()) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SIT))) )
{
setControlFlags(AGENT_CONTROL_SIT_ON_GROUND);
}
// [/RLVa:KB]
}
@ -2102,7 +2130,15 @@ void LLAgent::onAnimStop(const LLUUID& id)
}
else if (id == ANIM_AGENT_AWAY)
{
// clearAFK();
// [RLVa:KB] - Checked: 2010-05-03 (RLVa-1.2.0g) | Added: RLVa-1.1.0g
#ifdef RLV_EXTENSION_CMD_ALLOWIDLE
if (!gRlvHandler.hasBehaviour(RLV_BHVR_ALLOWIDLE))
clearAFK();
#else
clearAFK();
#endif // RLV_EXTENSION_CMD_ALLOWIDLE
// [/RLVa:KB]
}
else if (id == ANIM_AGENT_STANDUP)
{
@ -3322,6 +3358,18 @@ void LLAgent::teleportRequest(
// Landmark ID = LLUUID::null means teleport home
void LLAgent::teleportViaLandmark(const LLUUID& landmark_asset_id)
{
// [RLVa:KB] - Checked: 2010-08-22 (RLVa-1.2.1a) | Modified: RLVa-1.2.1a
// NOTE: we'll allow teleporting home unless both @tplm=n *and* @tploc=n restricted
if ( (rlv_handler_t::isEnabled()) &&
( ( (landmark_asset_id.notNull()) ? gRlvHandler.hasBehaviour(RLV_BHVR_TPLM)
: gRlvHandler.hasBehaviour(RLV_BHVR_TPLM) && gRlvHandler.hasBehaviour(RLV_BHVR_TPLOC) ) ||
((gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) && (isAgentAvatarValid()) && (gAgentAvatarp->isSitting())) ))
{
RlvUIEnabler::notifyBlockedTeleport();
return;
}
// [/RLVa:KB]
LLViewerRegion *regionp = getRegion();
if(regionp && teleportCore())
{
@ -3386,6 +3434,25 @@ void LLAgent::teleportCancel()
void LLAgent::teleportViaLocation(const LLVector3d& pos_global)
{
// [RLVa:KB] - Checked: 2010-03-02 (RLVa-1.2.0c) | Modified: RLVa-1.2.0a
if ( (rlv_handler_t::isEnabled()) && (!RlvUtil::isForceTp()) )
{
// If we're getting teleported due to @tpto we should disregard any @tploc=n or @unsit=n restrictions from the same object
if ( (gRlvHandler.hasBehaviourExcept(RLV_BHVR_TPLOC, gRlvHandler.getCurrentObject())) ||
( (isAgentAvatarValid()) && (gAgentAvatarp->isSitting()) &&
(gRlvHandler.hasBehaviourExcept(RLV_BHVR_UNSIT, gRlvHandler.getCurrentObject()))) )
{
RlvUIEnabler::notifyBlockedTeleport();
return;
}
if ( (gRlvHandler.getCurrentCommand()) && (RLV_BHVR_TPTO == gRlvHandler.getCurrentCommand()->getBehaviourType()) )
{
gRlvHandler.setCanCancelTp(false);
}
}
// [/RLVa:KB]
LLViewerRegion* regionp = getRegion();
U64 handle = to_region_handle(pos_global);
LLSimInfo* info = LLWorldMap::getInstance()->simInfoFromHandle(handle);
@ -3428,6 +3495,16 @@ void LLAgent::teleportViaLocation(const LLVector3d& pos_global)
// Teleport to global position, but keep facing in the same direction
void LLAgent::teleportViaLocationLookAt(const LLVector3d& pos_global)
{
// [RLVa:KB] - Checked: 2010-10-07 (RLVa-1.2.1f) | Added: RLVa-1.2.1f
// RELEASE-RLVa: [SL-2.2.0] Make sure this isn't used for anything except double-click teleporting
if ( (rlv_handler_t::isEnabled()) && (!RlvUtil::isForceTp()) &&
((gRlvHandler.hasBehaviour(RLV_BHVR_SITTP)) || (!gRlvHandler.canStand())) )
{
RlvUIEnabler::notifyBlockedTeleport();
return;
}
// [/RLVa:KB]
mbTeleportKeepsLookAt = true;
gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); // detach camera form avatar, so it keeps direction
U64 region_handle = to_region_handle(pos_global);

View File

@ -48,6 +48,9 @@
#include "llvoavatarself.h"
#include "llwindow.h"
#include "llworld.h"
// [RLVa:KB] - Checked: 2010-05-10 (RLVa-1.2.0g)
#include "rlvhandler.h"
// [/RLVa:KB]
using namespace LLVOAvatarDefines;
@ -2256,6 +2259,13 @@ void LLAgentCamera::changeCameraToCustomizeAvatar()
return;
}
// [RLVa:KB] - Checked: 2010-03-07 (RLVa-1.2.0c) | Modified: RLVa-1.0.0g
if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.canStand()) )
{
return;
}
// [/RLVa:KB]
gAgent.standUp(); // force stand up
gViewerWindow->getWindow()->resetBusyCount();

View File

@ -37,6 +37,9 @@
#include "llviewerobject.h"
#include "llviewerobjectlist.h"
#include "llviewerregion.h"
// [RLVa:KB] - Checked: 2010-03-06 (RLVa-1.2.0c)
#include "rlvhandler.h"
// [/RLVa:KB]
LLAgentListener::LLAgentListener(LLAgent &agent)
: LLEventAPI("LLAgent",
@ -85,8 +88,28 @@ void LLAgentListener::requestSit(LLSD const & event_data) const
// *TODO - find a permanent place to share this code properly.
LLViewerObject *object = gObjectList.findObject(event_data["obj_uuid"]);
// [RLVa:KB] - Checked: 2010-03-06 (RLVa-1.2.0c) | Modified: RLVa-1.1.0j
// TODO-RLVa: [RLVa-1.2.1] Figure out how to call this?
if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.canSit(object)) )
{
return;
}
// [/RLVa:KB]
if (object && object->getPCode() == LL_PCODE_VOLUME)
{
// [RLVa:KB] - Checked: 2010-08-29 (RLVa-1.2.1c) | Added: RLVa-1.2.1c
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_STANDTP)) && (isAgentAvatarValid()) )
{
if (gAgentAvatarp->isSitting())
{
gAgent.standUp();
return;
}
gRlvHandler.setSitSource(gAgent.getPositionGlobal());
}
// [/RLVa:KB]
gMessageSystem->newMessageFast(_PREHASH_AgentRequestSit);
gMessageSystem->nextBlockFast(_PREHASH_AgentData);
gMessageSystem->addUUIDFast(_PREHASH_AgentID, mAgent.getID());
@ -101,6 +124,14 @@ void LLAgentListener::requestSit(LLSD const & event_data) const
void LLAgentListener::requestStand(LLSD const & event_data) const
{
// [RLVa:KB] - Checked: 2010-03-07 (RLVa-1.2.0c) | Added: RLVa-1.2.0a
// TODO-RLVa: [RLVa-1.2.1] Figure out how to call this?
if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.canStand()) )
{
return;
}
// [/RLVa:KB]
mAgent.setControlFlags(AGENT_CONTROL_STAND_UP);
}

View File

@ -38,6 +38,9 @@
#include "llviewerparcelmgr.h"
#include "llvoavatarself.h"
#include "llslurl.h"
// [RLVa:KB] - Checked: 2010-04-04 (RLVa-1.2.0d)
#include "rlvhandler.h"
// [/RLVa:KB]
//static
void LLAgentUI::buildFullname(std::string& name)
@ -99,6 +102,18 @@ BOOL LLAgentUI::buildLocationString(std::string& str, ELocationFormat fmt,const
// create a default name and description for the landmark
std::string parcel_name = LLViewerParcelMgr::getInstance()->getAgentParcelName();
std::string region_name = region->getName();
// [RLVa:KB] - Checked: 2010-04-04 (RLVa-1.2.0d) | Modified: RLVa-1.2.0d
// RELEASE-RLVa: [SL-2.0.0] Check ELocationFormat to make sure our switch still makes sense
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
{
parcel_name = RlvStrings::getString(RLV_STRING_HIDDEN_PARCEL);
region_name = RlvStrings::getString(RLV_STRING_HIDDEN_REGION);
if (LOCATION_FORMAT_NO_MATURITY == fmt)
fmt = LOCATION_FORMAT_LANDMARK;
else if (LOCATION_FORMAT_FULL == fmt)
fmt = LOCATION_FORMAT_NO_COORDS;
}
// [/RLVa:KB]
std::string sim_access_string = region->getSimAccessString();
std::string buffer;
if( parcel_name.empty() )

View File

@ -49,6 +49,9 @@
#include "llvoavatarself.h"
#include "llwearable.h"
#include "llwearablelist.h"
// [RLVa:KB] - Checked: RLVa-1.2.0a (2010-03-04)
#include "rlvhandler.h"
// [/RLVa:KB]
#include <boost/scoped_ptr.hpp>
@ -763,12 +766,28 @@ U32 LLAgentWearables::pushWearable(const LLWearableType::EType type, LLWearable
llwarns << "Null wearable sent for type " << type << llendl;
return MAX_CLOTHING_PER_TYPE;
}
if (type < LLWearableType::WT_COUNT || mWearableDatas[type].size() < MAX_CLOTHING_PER_TYPE)
// if (type < LLWearableType::WT_COUNT || mWearableDatas[type].size() < MAX_CLOTHING_PER_TYPE)
// {
// mWearableDatas[type].push_back(wearable);
// wearableUpdated(wearable);
// checkWearableAgainstInventory(wearable);
// return mWearableDatas[type].size()-1;
// }
// [RLVa:KB] - Checked: 2010-06-08 (RLVa-1.2.0g) | Added: RLVa-1.2.0g
if ( (type < LLWearableType::WT_COUNT) && (mWearableDatas[type].size() < MAX_CLOTHING_PER_TYPE) )
{
mWearableDatas[type].push_back(wearable);
// Don't add the same wearable twice
U32 idxWearable = getWearableIndex(wearable);
RLV_ASSERT(MAX_CLOTHING_PER_TYPE == idxWearable); // pushWearable() on an already added wearable is a bug *somewhere*
if (MAX_CLOTHING_PER_TYPE == idxWearable)
{
mWearableDatas[type].push_back(wearable);
idxWearable = mWearableDatas[type].size() - 1;
}
wearableUpdated(wearable);
checkWearableAgainstInventory(wearable);
return mWearableDatas[type].size()-1;
return idxWearable;
// [/RLVa:KB]
}
return MAX_CLOTHING_PER_TYPE;
}
@ -1302,7 +1321,11 @@ void LLAgentWearables::removeWearable(const LLWearableType::EType type, bool do_
{
LLWearable* old_wearable = getWearable(type,index);
if (old_wearable)
// if (old_wearable)
// [RLVa:KB] - Checked: 2010-05-11 (RLVa-1.2.0c) | Modified: RLVa-1.2.0g
// NOTE: we block actual removal in removeWearableFinal(); all we really want here is to avoid showing the save notice
if ( (old_wearable) && ((!rlv_handler_t::isEnabled()) || (!gRlvWearableLocks.isLockedWearable(old_wearable))) )
// [/RLVa:KB]
{
if (old_wearable->isDirty())
{
@ -1360,20 +1383,30 @@ void LLAgentWearables::removeWearableFinal(const LLWearableType::EType type, boo
{
LLWearable* old_wearable = getWearable(type,i);
//queryWearableCache(); // moved below
if (old_wearable)
// if (old_wearable)
// [RLVa:KB] - Checked: 2010-05-14 (RLVa-1.2.0g) | Added: RLVa-1.2.0g
if ( (old_wearable) && ((!rlv_handler_t::isEnabled()) || (!gRlvWearableLocks.isLockedWearable(old_wearable))) )
// [/RLVa:KB]
{
popWearable(old_wearable);
old_wearable->removeFromAvatar(TRUE);
}
}
mWearableDatas[type].clear();
// mWearableDatas[type].clear();
// [RLVa:KB] - Checked: 2010-05-14 (RLVa-1.2.0g) | Added: RLVa-1.2.0g
// The line above shouldn't be needed and would cause issues if we block removing one of the wearables
RLV_VERIFY( ((!rlv_handler_t::isEnabled()) || (!gRlvWearableLocks.hasLockedWearable(type))) ? mWearableDatas[type].empty() : true );
// [/RLVa:KB]
}
else
{
LLWearable* old_wearable = getWearable(type, index);
//queryWearableCache(); // moved below
if (old_wearable)
// if (old_wearable)
// [RLVa:KB] - Checked: 2010-05-14 (RLVa-1.2.0g) | Added: RLVa-1.2.0g
if ( (old_wearable) && ((!rlv_handler_t::isEnabled()) || (!gRlvWearableLocks.isLockedWearable(old_wearable))) )
// [/RLVa:KB]
{
popWearable(old_wearable);
old_wearable->removeFromAvatar(TRUE);
@ -1411,6 +1444,12 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
S32 count = wearables.count();
llassert(items.count() == count);
// [RLVa:KB] - Checked: 2010-06-08 (RLVa-1.2.0g) | Added: RLVa-1.2.0g
// If the user is @add/remoutfit restricted in any way then this function won't just work as-is, so instead of removing and re-adding
// we're stuck with any wearable type potentially having left-over (remove locked) clothing that we'll need to reorder in-place
S32 idxCurPerType[LLWearableType::WT_COUNT] = { 0 };
// [/RLVa:KB]
S32 i;
for (i = 0; i < count; i++)
{
@ -1430,10 +1469,51 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
// exactly one wearable per body part
setWearable(type,0,new_wearable);
}
else
// else
// {
// pushWearable(type,new_wearable);
// }
// [RLVa:KB] - Checked: 2010-06-08 (RLVa-1.2.0g) | Added: RLVa-1.2.0g
else if ( (!rlv_handler_t::isEnabled()) || (!gRlvWearableLocks.hasLockedWearable(type)) || (!remove) )
{
// Sanity check: there shouldn't be any worn wearables for this type the first time we encounter it
RLV_ASSERT( (!remove) || (0 != idxCurPerType[type]) || (0 == getWearableCount(type)) );
pushWearable(type,new_wearable);
}
else
{
// Get the current index of the wearable (or add it if doesn't exist yet)
S32 idxCur = getWearableIndex(new_wearable);
if (MAX_CLOTHING_PER_TYPE == idxCur)
{
// Skip adding if @addoutfit=n restricted *unless* the wearable made it into COF [see LLAppMgr::updateAgentWearables()]
if ( (RLV_WEAR_LOCKED == gRlvWearableLocks.canWear(type)) &&
(!gInventory.isObjectDescendentOf(new_item->getUUID(), LLAppearanceMgr::instance().getCOF())) )
{
continue;
}
idxCur = pushWearable(type,new_wearable);
}
// Since we're moving up from index 0 we just swap the two wearables and things will work out in the end (hopefully)
if (idxCurPerType[type] != idxCur)
{
wearableentry_map_t::iterator itWearable = mWearableDatas.find(type);
RLV_ASSERT(itWearable != mWearableDatas.end());
if (itWearable == mWearableDatas.end()) continue;
wearableentry_vec_t& typeWearable = itWearable->second;
RLV_ASSERT(typeWearable.size() >= 2);
if (typeWearable.size() < 2) continue;
typeWearable[idxCur] = typeWearable[idxCurPerType[type]];
typeWearable[idxCurPerType[type]] = new_wearable;
//wearableUpdated(new_wearable);
//checkWearableAgainstInventory(new_wearable);
}
}
idxCurPerType[type]++;
// [/RLVa:KB]
wearableUpdated(new_wearable);
checkWearableAgainstInventory(new_wearable);
}
@ -1480,6 +1560,16 @@ void LLAgentWearables::setWearableItem(LLInventoryItem* new_item, LLWearable* ne
const LLWearableType::EType type = new_wearable->getType();
// [RLVa:KB] - Checked: 2010-03-19 (RLVa-1.2.0a) | Modified: RLVa-1.2.0g
// TODO-RLVa: [RLVa-1.2.1] This looks like dead code in SL-2.0.2 so we can't really check to see if it works :|
if (rlv_handler_t::isEnabled())
{
ERlvWearMask eWear = gRlvWearableLocks.canWear(type);
if ( (RLV_WEAR_LOCKED == eWear) || ((!do_append) && (!(eWear & RLV_WEAR_REPLACE))) )
return;
}
// [/RLVa:KB]
if (!do_append)
{
// Remove old wearable, if any
@ -1819,6 +1909,34 @@ void LLAgentWearables::userRemoveMultipleAttachments(llvo_vec_t& objects_to_remo
{
if (!isAgentAvatarValid()) return;
// [RLVa:KB] - Checked: 2010-03-04 (RLVa-1.2.0a) | Modified: RLVa-1.2.0a
// RELEASE-RLVa: [SL-2.0.0] Check our callers and verify that erasing elements from the passed vector won't break random things
if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_REMOVE)) )
{
llvo_vec_t::iterator itObj = objects_to_remove.begin();
while (itObj != objects_to_remove.end())
{
const LLViewerObject* pAttachObj = *itObj;
if (gRlvAttachmentLocks.isLockedAttachment(pAttachObj))
{
itObj = objects_to_remove.erase(itObj);
// Fall-back code: re-add the attachment if it got removed from COF somehow (compensates for possible bugs elsewhere)
LLInventoryModel::cat_array_t folders; LLInventoryModel::item_array_t items;
LLLinkedItemIDMatches f(pAttachObj->getAttachmentItemID());
gInventory.collectDescendentsIf(LLAppearanceMgr::instance().getCOF(), folders, items, LLInventoryModel::EXCLUDE_TRASH, f);
RLV_ASSERT( 0 != items.count() );
if (0 == items.count())
LLAppearanceMgr::instance().registerAttachment(pAttachObj->getAttachmentItemID());
}
else
{
++itObj;
}
}
}
// [/RLVa:KB]
if (objects_to_remove.empty())
return;
@ -1865,6 +1983,23 @@ void LLAgentWearables::userRemoveAllAttachments()
void LLAgentWearables::userAttachMultipleAttachments(LLInventoryModel::item_array_t& obj_item_array)
{
// [RLVa:KB] - Checked: 2010-03-04 (RLVa-1.2.0a) | Modified: RLVa-1.2.0a
// RELEASE-RLVa: [SL-2.0.0] Check our callers and verify that erasing elements from the passed vector won't break random things
if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_ANY)) )
{
// Fall-back code: everything should really already have been pruned before we get this far
for (S32 idxItem = obj_item_array.count() - 1; idxItem >= 0; idxItem--)
{
const LLInventoryItem* pItem = obj_item_array.get(idxItem).get();
if (!gRlvAttachmentLocks.canAttach(pItem))
{
obj_item_array.remove(idxItem);
RLV_ASSERT(false);
}
}
}
// [/RLVa:KB]
// Build a compound message to send all the objects that need to be rezzed.
S32 obj_count = obj_item_array.count();
@ -1902,6 +2037,12 @@ void LLAgentWearables::userAttachMultipleAttachments(LLInventoryModel::item_arra
msg->addUUIDFast(_PREHASH_ItemID, item->getLinkedUUID());
msg->addUUIDFast(_PREHASH_OwnerID, item->getPermissions().getOwner());
msg->addU8Fast(_PREHASH_AttachmentPt, 0 | ATTACHMENT_ADD); // Wear at the previous or default attachment point
// [RLVa:KB] - Checked: 2010-07-28 (RLVa-1.2.0i) | Added: RLVa-1.2.0i
if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_ANY)) )
{
RlvAttachmentLockWatchdog::instance().onWearAttachment(item, RLV_WEAR_ADD);
}
// [/RLVa:KB]
pack_permissions_slam(msg, item->getFlags(), item->getPermissions());
msg->addStringFast(_PREHASH_Name, item->getName());
msg->addStringFast(_PREHASH_Description, item->getDescription());

View File

@ -49,6 +49,9 @@
#include "llvoavatarself.h"
#include "llviewerregion.h"
#include "llwearablelist.h"
// [RLVa:KB] - Checked: 2010-03-05 (RLVa-1.2.0b)
#include "rlvhandler.h"
// [/RLVa:KB]
// RAII thingy to guarantee that a variable gets reset when the Setter
// goes out of scope. More general utility would be handy - TODO:
@ -1027,6 +1030,33 @@ bool LLAppearanceMgr::wearItemOnAvatar(const LLUUID& item_id_to_wear, bool do_up
return false;
}
// [RLVa:KB] - Checked: 2010-09-04 (RLVa-1.2.1a) | Modified: RLVa-1.2.1a
if ( (rlv_handler_t::isEnabled()) &&
((gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_ANY)) || (gRlvWearableLocks.hasLockedWearableType(RLV_LOCK_ANY))) )
{
switch (item_to_wear->getType())
{
case LLAssetType::AT_BODYPART:
case LLAssetType::AT_CLOTHING:
{
ERlvWearMask eWear = gRlvWearableLocks.canWear(item_to_wear);
if ( (RLV_WEAR_LOCKED == eWear) || ((replace) && ((RLV_WEAR_REPLACE & eWear) == 0)) )
return false;
}
break;
case LLAssetType::AT_OBJECT:
{
ERlvWearMask eWear = gRlvAttachmentLocks.canAttach(item_to_wear);
if ( (RLV_WEAR_LOCKED == eWear) || ((replace) && ((RLV_WEAR_REPLACE & eWear) == 0)) )
return false;
}
break;
default:
return false;
}
}
// [/RLVa:KB]
switch (item_to_wear->getType())
{
case LLAssetType::AT_CLOTHING:
@ -1391,6 +1421,45 @@ void LLAppearanceMgr::purgeCategory(const LLUUID& category, bool keep_outfit_lin
}
}
// [SL:KB] - Checked: 2010-04-24 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
void LLAppearanceMgr::syncCOF(const LLInventoryModel::item_array_t& items, LLAssetType::EType type, LLPointer<LLInventoryCallback> cb)
{
const LLUUID idCOF = getCOF();
LLInventoryModel::item_array_t cur_cof_items, new_cof_items = items;
// Grab the current COF contents
LLIsType f(type);
LLInventoryModel::cat_array_t cats;
gInventory.collectDescendentsIf(getCOF(), cats, cur_cof_items, LLInventoryModel::EXCLUDE_TRASH, f);
// Purge everything in cur_cof_items that isn't part of new_cof_items
for (S32 idxCurItem = 0, cntCurItem = cur_cof_items.count(); idxCurItem < cntCurItem; idxCurItem++)
{
const LLViewerInventoryItem* pItem = cur_cof_items.get(idxCurItem);
if (std::find_if(new_cof_items.begin(), new_cof_items.end(), RlvPredIsEqualOrLinkedItem(pItem)) == new_cof_items.end())
{
// Item doesn't exist in new_cof_items => purge (if it's a link)
if (pItem->getIsLinkType())
gInventory.purgeObject(pItem->getUUID());
}
else
{
// Item exists in new_cof_items => remove *all* occurances in new_cof_items (removes duplicate COF links to this item as well)
new_cof_items.erase(
std::remove_if(new_cof_items.begin(), new_cof_items.end(), RlvPredIsEqualOrLinkedItem(pItem)), new_cof_items.end());
}
}
// Link to whatever remains in new_cof_items
for (S32 idxNewItem = 0, cntNewItem = new_cof_items.count(); idxNewItem < cntNewItem; idxNewItem++)
{
const LLInventoryItem* pItem = new_cof_items.get(idxNewItem);
link_inventory_item(
gAgent.getID(), pItem->getLinkedUUID(), idCOF, pItem->getName(), pItem->LLInventoryItem::getDescription(), LLAssetType::AT_LINK, cb);
}
}
// [/SL:KB]
// Keep the last N wearables of each type. For viewer 2.0, N is 1 for
// both body parts and clothing items.
void LLAppearanceMgr::filterWearableItems(
@ -1443,10 +1512,31 @@ void LLAppearanceMgr::linkAll(const LLUUID& cat_uuid,
}
}
//void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append)
// [RLVa:KB] - Checked: 2010-03-05 (RLVa-1.2.0b) | Added: RLVa-1.2.0b
void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append)
{
LLViewerInventoryCategory *pcat = gInventory.getCategory(category);
llinfos << "starting, cat " << (pcat ? pcat->getName() : "[UNKNOWN]") << llendl;
LLInventoryModel::item_array_t body_items_new, wear_items_new, obj_items_new, gest_items_new;
getDescendentsOfAssetType(category, body_items_new, LLAssetType::AT_BODYPART, false);
getDescendentsOfAssetType(category, wear_items_new, LLAssetType::AT_CLOTHING, false);
getDescendentsOfAssetType(category, obj_items_new, LLAssetType::AT_OBJECT, false);
getDescendentsOfAssetType(category, gest_items_new, LLAssetType::AT_GESTURE, false);
updateCOF(body_items_new, wear_items_new, obj_items_new, gest_items_new, append, category);
}
void LLAppearanceMgr::updateCOF(LLInventoryModel::item_array_t& body_items_new,
LLInventoryModel::item_array_t& wear_items_new,
LLInventoryModel::item_array_t& obj_items_new,
LLInventoryModel::item_array_t& gest_items_new,
bool append /*=false*/, const LLUUID& idOutfit /*=LLUUID::null*/)
// [/RLVa:KB]
{
// LLViewerInventoryCategory *pcat = gInventory.getCategory(category);
// llinfos << "starting, cat " << (pcat ? pcat->getName() : "[UNKNOWN]") << llendl;
// [RLVa:KB] - Checked: 2010-03-26 (RLVa-1.2.0b) | Added: RLVa-1.2.0b
// RELEASE-RLVa: [SL-2.0.0] If pcat ever gets used for anything further down the beta we'll know about it
llinfos << "starting" << llendl;
// [/RLVa:KB]
const LLUUID cof = getCOF();
@ -1467,75 +1557,143 @@ void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append)
// Collect and filter descendents to determine new COF contents.
// - Body parts: always include COF contents as a fallback in case any
// required parts are missing.
//
// - Body parts: always include COF contents as a fallback in case any required parts are missing.
//
// Preserve body parts from COF if appending.
LLInventoryModel::item_array_t body_items;
getDescendentsOfAssetType(cof, body_items, LLAssetType::AT_BODYPART, false);
getDescendentsOfAssetType(category, body_items, LLAssetType::AT_BODYPART, false);
if (append)
reverse(body_items.begin(), body_items.end());
// getDescendentsOfAssetType(category, body_items, LLAssetType::AT_BODYPART, false);
// [RLVa:KB] - Checked: 2010-03-19 (RLVa-1.2.0c) | Modified: RLVa-1.2.0b
// Filter out any new body parts that can't be worn before adding them
if ( (rlv_handler_t::isEnabled()) && (gRlvWearableLocks.hasLockedWearableType(RLV_LOCK_ANY)) )
body_items_new.erase(std::remove_if(body_items_new.begin(), body_items_new.end(), rlvPredIsNotWearableItem), body_items_new.end());
body_items.insert(body_items.end(), body_items_new.begin(), body_items_new.end());
// [/RLVa:KB]
// NOTE-RLVa: we don't actually want to favour COF body parts over the folder's body parts (if only because it breaks force wear)
// if (append)
// reverse(body_items.begin(), body_items.end());
// Reduce body items to max of one per type.
removeDuplicateItems(body_items);
filterWearableItems(body_items, 1);
//
// - Wearables: include COF contents only if appending.
//
LLInventoryModel::item_array_t wear_items;
if (append)
getDescendentsOfAssetType(cof, wear_items, LLAssetType::AT_CLOTHING, false);
getDescendentsOfAssetType(category, wear_items, LLAssetType::AT_CLOTHING, false);
// [RLVa:KB] - Checked: 2010-03-19 (RLVa-1.2.0c) | Modified: RLVa-1.2.0b
else if ( (rlv_handler_t::isEnabled()) && (gRlvWearableLocks.hasLockedWearableType(RLV_LOCK_ANY)) )
{
// Make sure that all currently locked clothing layers remain in COF when replacing
getDescendentsOfAssetType(cof, wear_items, LLAssetType::AT_CLOTHING, false);
wear_items.erase(std::remove_if(wear_items.begin(), wear_items.end(), rlvPredIsRemovableItem), wear_items.end());
}
// [/RLVa:KB]
// getDescendentsOfAssetType(category, wear_items, LLAssetType::AT_CLOTHING, false);
// [RLVa:KB] - Checked: 2010-03-19 (RLVa-1.2.0c) | Modified: RLVa-1.2.0b
// Filter out any new wearables that can't be worn before adding them
if ( (rlv_handler_t::isEnabled()) && (gRlvWearableLocks.hasLockedWearableType(RLV_LOCK_ANY)) )
wear_items_new.erase(std::remove_if(wear_items_new.begin(), wear_items_new.end(), rlvPredIsNotWearableItem), wear_items_new.end());
wear_items.insert(wear_items.end(), wear_items_new.begin(), wear_items_new.end());
// [/RLVa:KB]
// Reduce wearables to max of one per type.
removeDuplicateItems(wear_items);
filterWearableItems(wear_items, LLAgentWearables::MAX_CLOTHING_PER_TYPE);
//
// - Attachments: include COF contents only if appending.
//
LLInventoryModel::item_array_t obj_items;
if (append)
getDescendentsOfAssetType(cof, obj_items, LLAssetType::AT_OBJECT, false);
getDescendentsOfAssetType(category, obj_items, LLAssetType::AT_OBJECT, false);
// [RLVa:KB] - Checked: 2010-03-05 (RLVa-1.2.0z) | Modified: RLVa-1.2.0b
else if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_ANY)) )
{
// Make sure that all currently locked attachments remain in COF when replacing
getDescendentsOfAssetType(cof, obj_items, LLAssetType::AT_OBJECT, false);
obj_items.erase(std::remove_if(obj_items.begin(), obj_items.end(), rlvPredIsRemovableItem), obj_items.end());
}
// [/RLVa:KB]
// getDescendentsOfAssetType(category, obj_items, LLAssetType::AT_OBJECT, false);
// [RLVa:KB] - Checked: 2010-03-05 (RLVa-1.2.0z) | Modified: RLVa-1.2.0b
// Filter out any new attachments that can't be worn before adding them
if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_ANY)) )
obj_items_new.erase(std::remove_if(obj_items_new.begin(), obj_items_new.end(), rlvPredIsNotWearableItem), obj_items_new.end());
obj_items.insert(obj_items.end(), obj_items_new.begin(), obj_items_new.end());
// [/RLVa:KB]
removeDuplicateItems(obj_items);
//
// - Gestures: include COF contents only if appending.
//
LLInventoryModel::item_array_t gest_items;
if (append)
getDescendentsOfAssetType(cof, gest_items, LLAssetType::AT_GESTURE, false);
getDescendentsOfAssetType(category, gest_items, LLAssetType::AT_GESTURE, false);
// getDescendentsOfAssetType(category, gest_items, LLAssetType::AT_GESTURE, false);
// [RLVa:KB] - Checked: 2010-03-05 (RLVa-1.2.0z) | Added: RLVa-1.2.0b
gest_items.insert(gest_items.end(), gest_items_new.begin(), gest_items_new.end());
// [/RLVa:KB]
removeDuplicateItems(gest_items);
// Remove current COF contents.
bool keep_outfit_links = append;
purgeCategory(cof, keep_outfit_links);
gInventory.notifyObservers();
// Create links to new COF contents.
llinfos << "creating LLUpdateAppearanceOnDestroy" << llendl;
LLPointer<LLInventoryCallback> link_waiter = new LLUpdateAppearanceOnDestroy(!append);
#ifndef LL_RELEASE_FOR_DOWNLOAD
llinfos << "Linking body items" << llendl;
#endif
linkAll(cof, body_items, link_waiter);
#ifndef LL_RELEASE_FOR_DOWNLOAD
llinfos << "Linking wear items" << llendl;
#endif
linkAll(cof, wear_items, link_waiter);
#ifndef LL_RELEASE_FOR_DOWNLOAD
llinfos << "Linking obj items" << llendl;
#endif
linkAll(cof, obj_items, link_waiter);
#ifndef LL_RELEASE_FOR_DOWNLOAD
llinfos << "Linking gesture items" << llendl;
#endif
linkAll(cof, gest_items, link_waiter);
// Add link to outfit if category is an outfit.
// [SL:KB] - Checked: 2010-04-24 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
if (!append)
{
createBaseOutfitLink(category, link_waiter);
// [/SL:KB]
// Remove current COF contents.
bool keep_outfit_links = append;
purgeCategory(cof, keep_outfit_links);
gInventory.notifyObservers();
#ifndef LL_RELEASE_FOR_DOWNLOAD
llinfos << "Linking body items" << llendl;
#endif
linkAll(cof, body_items, link_waiter);
#ifndef LL_RELEASE_FOR_DOWNLOAD
llinfos << "Linking wear items" << llendl;
#endif
linkAll(cof, wear_items, link_waiter);
#ifndef LL_RELEASE_FOR_DOWNLOAD
llinfos << "Linking obj items" << llendl;
#endif
linkAll(cof, obj_items, link_waiter);
#ifndef LL_RELEASE_FOR_DOWNLOAD
llinfos << "Linking gesture items" << llendl;
#endif
linkAll(cof, gest_items, link_waiter);
// [SL:KB] - Checked: 2010-04-24 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
}
else
{
// Synchronize COF
// -> it's possible that we don't link to any new items in which case 'link_waiter' fires when it goes out of scope below
syncCOF(body_items, LLAssetType::AT_BODYPART, link_waiter);
syncCOF(wear_items, LLAssetType::AT_CLOTHING, link_waiter);
syncCOF(obj_items, LLAssetType::AT_OBJECT, link_waiter);
syncCOF(gest_items, LLAssetType::AT_GESTURE, link_waiter);
gInventory.notifyObservers();
}
// [/SL:KB]
// Add link to outfit if category is an outfit.
// [RLVa:KB] - Checked: 2010-03-05 (RLVa-1.2.0z) | Added: RLVa-1.2.0b
if ( (!append) && (idOutfit.notNull()) )
{
createBaseOutfitLink(idOutfit, link_waiter);
}
// [/RLVa:KB]
// if (!append)
// {
// createBaseOutfitLink(category, link_waiter);
// }
llinfos << "waiting for LLUpdateAppearanceOnDestroy" << llendl;
}
@ -1586,6 +1744,25 @@ void LLAppearanceMgr::updateAgentWearables(LLWearableHoldingPattern* holder, boo
LLViewerInventoryItem* item = (LLViewerInventoryItem*)gInventory.getItem(data.mItemID);
if( item && (item->getAssetUUID() == wearable->getAssetID()) )
{
// [RLVa:KB] - Checked: 2010-03-19 (RLVa-1.2.0g) | Modified: RLVa-1.2.0g
// TODO-RLVa: [RLVa-1.2.1] This is fall-back code so if we don't ever trigger this code it can just be removed
// -> one way to trigger the assertion:
// 1) "Replace Outfit" on a folder with clothing and an attachment that goes @addoutfit=n
// 2) updateCOF will add/link the items into COF => no @addoutfit=n present yet => allowed
// 3) llOwnerSay("@addoutfit=n") executes
// 4) code below runs => @addoutfit=n conflicts with adding new wearables
// => if it's left as-is then the wearables won't get worn (but remain in COF which causes issues of its own)
// => if it's changed to debug-only then we make tge assumption that anything that makes it into COF is always OK
#ifdef RLV_DEBUG
// NOTE: make sure we don't accidentally block setting the initial wearables
if ( (rlv_handler_t::isEnabled()) && (RLV_WEAR_LOCKED == gRlvWearableLocks.canWear(wearable->getType())) &&
(!gAgentWearables.getWearableFromItemID(item->getUUID())) && (gAgentWearables.areWearablesLoaded()) )
{
RLV_VERIFY(RLV_WEAR_LOCKED == gRlvWearableLocks.canWear(wearable->getType()));
continue;
}
#endif // RLV_DEBUG
// [/RLVa:KB]
items.put(item);
wearables.put(wearable);
}
@ -2608,6 +2785,9 @@ void LLAppearanceMgr::removeItemFromAvatar(const LLUUID& id_to_remove)
// LLWearableBridge::removeItemFromAvatar(item_to_remove);
// }
// [SL:KB] - Patch: Appearance-RemoveWearableFromAvatar | Checked: 2010-08-13 (Catznip-2.2.0a) | Added: Catznip-2.1.1d
// [RLVa:KB] - Checked: 2010-09-04 (RLVa-1.2.1c) | Added: RLVa-1.2.1c
if ( (!rlv_handler_t::isEnabled()) || (gRlvWearableLocks.canRemove(item_to_remove)) )
// [/RLVa:KB]
{
/*const*/ LLWearable* pWearable = gAgentWearables.getWearableFromItemID(item_to_remove->getLinkedUUID());
if ( (pWearable) && (LLAssetType::AT_BODYPART != pWearable->getAssetType()) )

View File

@ -56,6 +56,11 @@ public:
// [/SL:KB]
bool needToSaveCOF();
void updateCOF(const LLUUID& category, bool append = false);
// [RLVa:KB] - Checked: 2010-03-05 (RLVa-1.2.0a) | Added: RLVa-1.2.0a
void updateCOF(LLInventoryModel::item_array_t& body_items_new, LLInventoryModel::item_array_t& wear_items_new,
LLInventoryModel::item_array_t& obj_items_new, LLInventoryModel::item_array_t& gest_items_new,
bool append = false, const LLUUID& idOutfit = LLUUID::null);
// [/RLVa:KB]
void wearInventoryCategory(LLInventoryCategory* category, bool copy, bool append);
void wearInventoryCategoryOnAvatar(LLInventoryCategory* category, bool append);
void wearCategoryFinal(LLUUID& cat_id, bool copy_items, bool append);
@ -208,6 +213,10 @@ private:
void setOutfitLocked(bool locked);
// [SL:KB] - Checked: 2010-04-24 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
void syncCOF(const LLInventoryModel::item_array_t& items, LLAssetType::EType type, LLPointer<LLInventoryCallback> cb);
// [/SL:KB]
bool mAttachmentInvLinkEnabled;
bool mOutfitIsDirty;
bool mIsInUpdateAppearanceFromCOF; // to detect recursive calls.

View File

@ -81,6 +81,10 @@
#include "llurlmatch.h"
#include "lltextutil.h"
// [RLVa:KB] - Checked: 2010-05-03 (RLVa-1.2.0g)
#include "rlvhandler.h"
// [/RLVa:KB]
#include "llweb.h"
#include "llsecondlifeurls.h"
@ -336,7 +340,16 @@ LLAppViewer::LLUpdaterInfo *LLAppViewer::sUpdaterInfo = NULL ;
void idle_afk_check()
{
// check idle timers
// if (gSavedSettings.getS32("AFKTimeout") && (gAwayTriggerTimer.getElapsedTimeF32() > gSavedSettings.getS32("AFKTimeout")))
// [RLVa:KB] - Checked: 2010-05-03 (RLVa-1.2.0g) | Modified: RLVa-1.2.0g
#ifdef RLV_EXTENSION_CMD_ALLOWIDLE
// Enforce an idle time of 30 minutes if @allowidle=n restricted
S32 nAFKTimeout = (gRlvHandler.hasBehaviour(RLV_BHVR_ALLOWIDLE)) ? gSavedSettings.getS32("AFKTimeout") : 60 * 30;
if ( (nAFKTimeout) && (gAwayTriggerTimer.getElapsedTimeF32() > nAFKTimeout) )
#else
if (gSavedSettings.getS32("AFKTimeout") && (gAwayTriggerTimer.getElapsedTimeF32() > gSavedSettings.getS32("AFKTimeout")))
#endif // RLV_EXTENSION_CMD_ALLOWIDLE
// [/RLVa:KB]
{
gAgent.setAFK();
}

View File

@ -33,7 +33,9 @@
#include "llviewerinventory.h"
#include "llviewerregion.h"
#include "message.h"
// [RLVa:KB] - Checked: 2010-09-13 (RLVa-1.2.1c)
#include "rlvhandler.h"
// [/RLVa:KB]
LLAttachmentsMgr::LLAttachmentsMgr()
{
@ -45,12 +47,35 @@ LLAttachmentsMgr::~LLAttachmentsMgr()
void LLAttachmentsMgr::addAttachment(const LLUUID& item_id,
const U8 attachment_pt,
const BOOL add)
// const BOOL add)
// [RLVa:KB] - Checked: 2010-09-13 (RLVa-1.2.1c) | Added: RLVa-1.2.1c
const BOOL add, const BOOL fRlvForce /*=FALSE*/)
// [/RLVa:KB]
{
AttachmentsInfo attachment;
attachment.mItemID = item_id;
attachment.mAttachmentPt = attachment_pt;
attachment.mAdd = add;
// [RLVa:KB] - Checked: 2010-09-23 (RLVa-1.2.1d) | Modified: RLVa-1.2.1d
if ( (rlv_handler_t::isEnabled()) && (!fRlvForce) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_ANY)) )
{
const LLInventoryItem* pItem = gInventory.getItem(item_id);
if (!pItem)
return;
LLViewerJointAttachment* pAttachPt = NULL;
ERlvWearMask eWearMask = gRlvAttachmentLocks.canAttach(pItem, &pAttachPt);
if ( ((add) && ((RLV_WEAR_ADD & eWearMask) == 0)) || ((!add) && ((RLV_WEAR_REPLACE & eWearMask) == 0)) )
return;
if ( (0 == attachment_pt) && (NULL != pAttachPt) )
attachment.mAttachmentPt = RlvAttachPtLookup::getAttachPointIndex(pAttachPt);
RlvAttachmentLockWatchdog::instance().onWearAttachment(pItem, (add) ? RLV_WEAR_ADD : RLV_WEAR_REPLACE);
attachment.mAdd = true;
}
// [/RLVa:KB]
mPendingAttachments.push_back(attachment);
}

View File

@ -54,7 +54,10 @@ public:
void addAttachment(const LLUUID& item_id,
const U8 attachment_pt,
const BOOL add);
// const BOOL add);
// [RLVa:KB] - Checked: 2010-09-13 (RLVa-1.2.1c) | Added: RLVa-1.2.1c
const BOOL add, const BOOL fRlvForce = FALSE);
// [/RLVa:KB]
static void onIdle(void *);
protected:
void onIdle();

View File

@ -46,6 +46,9 @@
#include "lluuid.h"
#include "llvoiceclient.h"
#include "llviewercontrol.h" // for gSavedSettings
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0d)
#include "rlvhandler.h"
// [/RLVa:KB]
static LLDefaultChildRegistry::Register<LLAvatarList> r("avatar_list");
@ -139,6 +142,9 @@ LLAvatarList::LLAvatarList(const Params& p)
, mShowProfileBtn(p.show_profile_btn)
, mShowSpeakingIndicator(p.show_speaking_indicator)
, mShowPermissions(p.show_permissions_granted)
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
, mRlvCheckShowNames(false)
// [/RLVa:KB]
{
setCommitOnSelectionChange(true);
@ -420,6 +426,9 @@ S32 LLAvatarList::notifyParent(const LLSD& info)
void LLAvatarList::addNewItem(const LLUUID& id, const std::string& name, BOOL is_online, EAddPosition pos)
{
LLAvatarListItem* item = new LLAvatarListItem();
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
item->setRlvCheckShowNames(mRlvCheckShowNames);
// [/RLVa:KB]
// This sets the name as a side effect
item->setAvatarId(id, mSessionID, mIgnoreOnlineStatus);
item->setOnline(mIgnoreOnlineStatus ? true : is_online);
@ -440,7 +449,10 @@ void LLAvatarList::addNewItem(const LLUUID& id, const std::string& name, BOOL is
BOOL LLAvatarList::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
BOOL handled = LLUICtrl::handleRightMouseDown(x, y, mask);
if ( mContextMenu )
// if ( mContextMenu )
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0d) | Modified: RLVa-1.2.0d
if ( (mContextMenu) && ((!mRlvCheckShowNames) || (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))) )
// [/RLVa:KB]
{
uuid_vec_t selected_uuids;
getSelectedUUIDs(selected_uuids);
@ -496,9 +508,32 @@ void LLAvatarList::updateLastInteractionTimes()
void LLAvatarList::onItemDoubleClicked(LLUICtrl* ctrl, S32 x, S32 y, MASK mask)
{
mItemDoubleClickSignal(ctrl, x, y, mask);
// mItemDoubleClickSignal(ctrl, x, y, mask);
// [RLVa:KB] - Checked: 2010-06-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
if ( (!mRlvCheckShowNames) || (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) )
mItemDoubleClickSignal(ctrl, x, y, mask);
// [/RLVa:KB]
}
// [RLVa:KB] - Checked: 2010-06-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
void LLAvatarList::refreshNames()
{
std::vector<LLPanel*> items;
getItems(items);
std::string strFullName;
for (std::vector<LLPanel*>::const_iterator itItem = items.begin(); itItem != items.end(); ++itItem)
{
LLAvatarListItem* pItem = static_cast<LLAvatarListItem*>(*itItem);
if (gCacheName->getFullName(pItem->getAvatarId(), strFullName))
pItem->setName(strFullName);
}
if (&NAME_COMPARATOR == mItemComparator)
sort();
}
// [/RLVa:KB]
bool LLAvatarItemComparator::compare(const LLPanel* item1, const LLPanel* item2) const
{
const LLAvatarListItem* avatar_item1 = dynamic_cast<const LLAvatarListItem*>(item1);

View File

@ -88,6 +88,11 @@ public:
// Return true if filter has at least one match.
bool filterHasMatches();
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
void setRlvCheckShowNames(bool fRlvCheckShowNames) { mRlvCheckShowNames = fRlvCheckShowNames; }
void refreshNames();
// [/RLVa:KB]
boost::signals2::connection setRefreshCompleteCallback(const commit_signal_t::slot_type& cb);
boost::signals2::connection setItemDoubleClickCallback(const mouse_signal_t::slot_type& cb);
@ -121,6 +126,9 @@ private:
bool mShowProfileBtn;
bool mShowSpeakingIndicator;
bool mShowPermissions;
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
bool mRlvCheckShowNames;
// [/RLVa:KB]
LLTimer* mLITUpdateTimer; // last interaction time update timer
std::string mIconParamName;

View File

@ -38,6 +38,9 @@
#include "llavatarnamecache.h"
#include "llavatariconctrl.h"
#include "lloutputmonitorctrl.h"
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d)
#include "rlvhandler.h"
// [/RLVa:KB]
bool LLAvatarListItem::sStaticInitialized = false;
S32 LLAvatarListItem::sLeftPadding = 0;
@ -71,6 +74,9 @@ LLAvatarListItem::LLAvatarListItem(bool not_from_ui_factory/* = true*/)
mOnlineStatus(E_UNKNOWN),
mShowInfoBtn(true),
mShowProfileBtn(true),
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
mRlvCheckShowNames(false),
// [/RLVa:KB]
mShowPermissions(false),
mHovered(false)
{
@ -138,8 +144,12 @@ S32 LLAvatarListItem::notifyParent(const LLSD& info)
void LLAvatarListItem::onMouseEnter(S32 x, S32 y, MASK mask)
{
getChildView("hovered_icon")->setVisible( true);
mInfoBtn->setVisible(mShowInfoBtn);
mProfileBtn->setVisible(mShowProfileBtn);
// mInfoBtn->setVisible(mShowInfoBtn);
// mProfileBtn->setVisible(mShowProfileBtn);
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
mInfoBtn->setVisible( (mShowInfoBtn) && ((!mRlvCheckShowNames) || (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))) );
mProfileBtn->setVisible( (mShowProfileBtn) && ((!mRlvCheckShowNames) || (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))) );
// [/RLVa:KB]
mHovered = true;
LLPanel::onMouseEnter(x, y, mask);
@ -189,7 +199,11 @@ void LLAvatarListItem::setOnline(bool online)
void LLAvatarListItem::setAvatarName(const std::string& name)
{
setNameInternal(name, mHighlihtSubstring);
// setNameInternal(name, mHighlihtSubstring);
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
bool fRlvFilter = (mRlvCheckShowNames) && (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES));
setNameInternal( (!fRlvFilter) ? name : RlvStrings::getAnonym(name), mHighlihtSubstring);
// [/RLVa:KB]
}
void LLAvatarListItem::setAvatarToolTip(const std::string& tooltip)

View File

@ -101,6 +101,9 @@ public:
void setShowPermissions(bool show) { mShowPermissions = show; };
void showLastInteractionTime(bool show);
void setAvatarIconVisible(bool visible);
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
void setRlvCheckShowNames(bool fRlvCheckShowNames) { mRlvCheckShowNames = fRlvCheckShowNames; }
// [/RLVa:KB]
const LLUUID& getAvatarId() const;
std::string getAvatarName() const;
@ -206,6 +209,9 @@ private:
//Speaker indicator and avatar name coords are translated accordingly
bool mShowInfoBtn;
bool mShowProfileBtn;
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
bool mRlvCheckShowNames;
// [/RLVa:KB]
/// indicates whether to show icons representing permissions granted
bool mShowPermissions;

View File

@ -53,6 +53,11 @@
#include "llviewerwindow.h"
#include "llsdserialize.h"
// [RLVa:KB] - Checked: 2010-09-11 (RLVa-1.2.1d)
#include "rlvhandler.h"
#include "rlvui.h"
// [/RLVa:KB]
// Distance from mouse down on which drag'n'drop should be started.
#define DRAG_START_DISTANCE 3
@ -94,7 +99,10 @@ BOOL LLBottomtrayButton::handleMouseDown(S32 x, S32 y, MASK mask)
static void update_build_button_enable_state()
{
bool can_edit = LLToolMgr::getInstance()->canEdit();
// bool can_edit = LLToolMgr::getInstance()->canEdit();
// [RLVa:KB] - Checked: 2010-09-11 (RLVa-1.2.1d) | Added: RLVa-1.2.1d
bool can_edit = RlvUIEnabler::isBuildEnabled();
// [/RLVa:KB]
LLBottomTray::getInstance()->getChildView("build_btn")->setEnabled(can_edit);
}

View File

@ -315,6 +315,10 @@ void LLCallFloater::updateSession()
setVisible(true);
}
}
// [RLVa:KB] - Checked: 2010-06-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
mAvatarList->setRlvCheckShowNames(is_local_chat);
// [/RLVa:KB]
}
void LLCallFloater::refreshParticipantList()

View File

@ -74,6 +74,10 @@ public:
static void sOnCurrentChannelChanged(const LLUUID& session_id);
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
LLAvatarList* getAvatarCallerList() { return mAvatarList; }
// [/RLVa:KB]
private:
typedef enum e_voice_controls_type
{

View File

@ -61,6 +61,9 @@
#include "llviewermenu.h"
#include "lluictrlfactory.h"
#include "llbottomtray.h"
// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0b)
#include "rlvhandler.h"
// [/RLVa:KB]
//
// Globals
@ -80,7 +83,10 @@ private:
};
extern void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel);
//extern void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel);
// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0b) | Modified: RLVa-0.2.2a
extern void send_chat_from_viewer(std::string utf8_out_text, EChatType type, S32 channel);
// [/RLVa:KB]
//
// Functions
@ -473,7 +479,11 @@ void LLChatBar::onInputEditorKeystroke( LLLineEditor* caller, void* userdata )
S32 length = raw_text.length();
if( (length > 0) && (raw_text[0] != '/') ) // forward slash is used for escape (eg. emote) sequences
// if( (length > 0) && (raw_text[0] != '/') ) // forward slash is used for escape (eg. emote) sequences
// [RLVa:KB] - Checked: 2010-03-26 (RLVa-1.2.0b) | Modified: RLVa-1.0.0d
// RELEASE-RLVa: [SL-2.0.0] This entire class appears to be dead/non-functional?
if ( (length > 0) && (raw_text[0] != '/') && (!gRlvHandler.hasBehaviour(RLV_BHVR_REDIRCHAT)) )
// [/RLVa:KB]
{
gAgent.startTyping();
}
@ -585,6 +595,22 @@ void LLChatBar::sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL
utf8_text = utf8str_truncate(utf8_text, MAX_STRING - 1);
}
// [RLVa:KB] - Checked: 2010-03-27 (RLVa-1.2.0b) | Modified: RLVa-1.2.0b
// RELEASE-RLVa: [SL-2.0.0] This entire class appears to be dead/non-functional?
if ( (0 == channel) && (rlv_handler_t::isEnabled()) )
{
// Adjust the (public) chat "volume" on chat and gestures (also takes care of playing the proper animation)
if ( ((CHAT_TYPE_SHOUT == type) || (CHAT_TYPE_NORMAL == type)) && (gRlvHandler.hasBehaviour(RLV_BHVR_CHATNORMAL)) )
type = CHAT_TYPE_WHISPER;
else if ( (CHAT_TYPE_SHOUT == type) && (gRlvHandler.hasBehaviour(RLV_BHVR_CHATSHOUT)) )
type = CHAT_TYPE_NORMAL;
else if ( (CHAT_TYPE_WHISPER == type) && (gRlvHandler.hasBehaviour(RLV_BHVR_CHATWHISPER)) )
type = CHAT_TYPE_NORMAL;
animate &= !gRlvHandler.hasBehaviour( (!RlvUtil::isEmote(utf8_text)) ? RLV_BHVR_REDIRCHAT : RLV_BHVR_REDIREMOTE );
}
// [/RLVa:KB]
// Don't animate for chats people can't hear (chat to scripts)
if (animate && (channel == 0))
{

View File

@ -55,8 +55,10 @@
#include "llworld.h"
#include "lluiconstants.h"
#include "llstring.h"
#include "llviewercontrol.h"
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f)
#include "rlvcommon.h"
// [/RLVa:KB]
#include "llsidetray.h"//for blocked objects panel
@ -90,6 +92,10 @@ public:
LLSD payload;
payload["object_id"] = object_id;
payload["owner_id"] = query_map["owner"];
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
if (query_map.has("owner_name"))
payload["owner_name"] = query_map["owner_name"];
// [/RLVa:KB]
payload["name"] = query_map["name"];
payload["slurl"] = LLWeb::escapeURL(query_map["slurl"]);
payload["group_owned"] = query_map["groupowned"];
@ -104,6 +110,10 @@ class LLChatHistoryHeader: public LLPanel
public:
LLChatHistoryHeader()
: LLPanel(),
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
mShowContextMenu(true),
mShowInfoCtrl(true),
// [/RLVa:KB]
mPopupMenuHandleAvatar(),
mPopupMenuHandleObject(),
mAvatarID(),
@ -225,7 +235,11 @@ public:
void showInspector()
{
if (mAvatarID.isNull() && CHAT_SOURCE_SYSTEM != mSourceType) return;
// if (mAvatarID.isNull() && CHAT_SOURCE_SYSTEM != mSourceType) return;
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
// Don't double-click show the inspector if we're not showing the info control
if ( (!mShowInfoCtrl) || (mAvatarID.isNull() && CHAT_SOURCE_SYSTEM != mSourceType) ) return;
// [/RLVa:KB]
if (mSourceType == CHAT_SOURCE_OBJECT)
{
@ -338,6 +352,15 @@ public:
if(mSourceType != CHAT_SOURCE_AGENT)
icon->setDrawTooltip(false);
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
// Don't show the context menu, info control or avatar icon tooltip if this chat was subject to @shownames=n
if ( (chat.mRlvNamesFiltered) && ((CHAT_SOURCE_AGENT == mSourceType) || (CHAT_SOURCE_OBJECT == mSourceType)) )
{
mShowInfoCtrl = mShowContextMenu = false;
icon->setDrawTooltip(false);
}
// [/RLVa:KB]
switch (mSourceType)
{
case CHAT_SOURCE_AGENT:
@ -424,6 +447,10 @@ protected:
void showContextMenu(S32 x,S32 y)
{
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
if (!mShowContextMenu)
return;
// [/RLVa:KB]
if(mSourceType == CHAT_SOURCE_SYSTEM)
showSystemContextMenu(x,y);
if(mAvatarID.notNull() && mSourceType == CHAT_SOURCE_AGENT)
@ -474,7 +501,10 @@ protected:
void showInfoCtrl()
{
if (mAvatarID.isNull() || mFrom.empty() || SYSTEM_FROM == mFrom) return;
// if (mAvatarID.isNull() || mFrom.empty() || SYSTEM_FROM == mFrom) return;
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
if ( (!mShowInfoCtrl) || (mAvatarID.isNull() || mFrom.empty() || SYSTEM_FROM == mFrom) ) return;
// [/RLVa:KB]
if (!sInfoCtrl)
{
@ -543,6 +573,10 @@ protected:
EChatSourceType mSourceType;
std::string mFrom;
LLUUID mSessionID;
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
bool mShowContextMenu;
bool mShowInfoCtrl;
// [/RLVa:KB]
S32 mMinUserNameWidth;
const LLFontGL* mUserNameFont;
@ -769,22 +803,32 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
// Don't hotlink any messages from the system (e.g. "Second Life:"), so just add those in plain text.
if ( chat.mSourceType == CHAT_SOURCE_OBJECT && chat.mFromID.notNull())
{
// for object IMs, create a secondlife:///app/objectim SLapp
std::string url = LLSLURL("objectim", chat.mFromID, "").getSLURLString();
url += "?name=" + chat.mFromName;
url += "&owner=" + chat.mOwnerID.asString();
std::string slurl = args["slurl"].asString();
if (slurl.empty())
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
// NOTE-RLVa: we don't need to do any @shownames or @showloc filtering here because we'll already have an existing URL
std::string url = chat.mURL;
RLV_ASSERT( (url.empty()) || (std::string::npos != url.find("objectim")) );
if ( (url.empty()) || (std::string::npos == url.find("objectim")) )
{
LLViewerRegion *region = LLWorld::getInstance()->getRegionFromPosAgent(chat.mPosAgent);
if(region)
{
LLSLURL region_slurl(region->getName(), chat.mPosAgent);
slurl = region_slurl.getLocationString();
}
// [/RLVa:KB]
// for object IMs, create a secondlife:///app/objectim SLapp
/*std::string*/ url = LLSLURL("objectim", chat.mFromID, "").getSLURLString();
url += "?name=" + chat.mFromName;
url += "&owner=" + chat.mOwnerID.asString();
std::string slurl = args["slurl"].asString();
if (slurl.empty())
{
LLViewerRegion *region = LLWorld::getInstance()->getRegionFromPosAgent(chat.mPosAgent);
if(region)
{
LLSLURL region_slurl(region->getName(), chat.mPosAgent);
slurl = region_slurl.getLocationString();
}
}
url += "&slurl=" + LLURI::escape(slurl);
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
}
url += "&slurl=" + LLURI::escape(slurl);
// [/RLVa:KB]
// set the link for the object name to be the objectim SLapp
// (don't let object names with hyperlinks override our objectim Url)
@ -795,7 +839,10 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
mEditor->appendText(chat.mFromName + delimiter,
false, link_params);
}
else if ( chat.mFromName != SYSTEM_FROM && chat.mFromID.notNull() && !message_from_log)
// else if (chat.mFromName != SYSTEM_FROM && chat.mFromID.notNull() && !message_from_log)
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
else if (chat.mFromName != SYSTEM_FROM && chat.mFromID.notNull() && !message_from_log && !chat.mRlvNamesFiltered)
// [/RLVa:KB]
{
LLStyle::Params link_params(style_params);
link_params.overwriteFrom(LLStyleMap::instance().lookupAgent(chat.mFromID));

View File

@ -41,6 +41,10 @@
#include "llslurl.h"
// [RLVa:KB] - Checked: 2010-04-21 (RLVa-1.2.0f)
#include "rlvhandler.h"
// [/RLVa:KB]
static const S32 msg_left_offset = 10;
static const S32 msg_right_offset = 10;
static const S32 msg_height_pad = 5;
@ -176,7 +180,11 @@ void LLNearbyChatToastPanel::init(LLSD& notification)
std::string fromName = notification["from"].asString(); // agent or object name
mFromID = notification["from_id"].asUUID(); // agent id or object id
mFromName = fromName;
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
mShowIconTooltip = notification.has("show_icon_tooltip") ? notification["show_icon_tooltip"].asBoolean() : true;
// [/RLVa:KB]
int sType = notification["source"].asInteger();
mSourceType = (EChatSourceType)sType;
@ -370,7 +378,10 @@ void LLNearbyChatToastPanel::draw()
LLAvatarIconCtrl* icon = getChild<LLAvatarIconCtrl>("avatar_icon", false);
if(icon)
{
icon->setDrawTooltip(mSourceType == CHAT_SOURCE_AGENT);
// icon->setDrawTooltip(mSourceType == CHAT_SOURCE_AGENT);
// [RLVa:KB] - Checked: 2010-04-200 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
icon->setDrawTooltip( (mShowIconTooltip) && (mSourceType == CHAT_SOURCE_AGENT) );
// [/RLVa:KB]
if(mSourceType == CHAT_SOURCE_OBJECT)
icon->setValue(LLSD("OBJECT_Icon"));
else if(mSourceType == CHAT_SOURCE_SYSTEM)

View File

@ -46,6 +46,9 @@ protected:
LLNearbyChatToastPanel()
:
mIsDirty(false),
// [RLVa:KB] - Checked: 2010-04-200 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
mShowIconTooltip(true),
// [/RLVa:KB]
mSourceType(CHAT_SOURCE_OBJECT)
{};
public:
@ -89,6 +92,9 @@ private:
bool mIsDirty;
// [RLVa:KB] - Checked: 2010-04-200 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
bool mShowIconTooltip;
// [/RLVa:KB]
};

View File

@ -41,6 +41,9 @@
#include "llviewerregion.h"
#include "llversioninfo.h"
#include "llweb.h"
// [RLVa:KB] - Checked: 2010-04-18 (RLVa-1.2.0e)
#include "rlvhandler.h"
// [/RLVa:KB]
// Linden library includes
#include "llaudioengine.h"
@ -254,6 +257,12 @@ LLSD LLFloaterAbout::getInfo()
}
#endif
// [RLVa:KB] - Checked: 2010-04-18 (RLVa-1.2.0e) | Added: RLVa-1.2.0e
if (rlv_handler_t::isEnabled())
info["RLV_VERSION"] = RlvStrings::getVersionAbout();
else
info["RLV_VERSION"] = "(disabled)";
// [/RLVa:KB]
info["OPENGL_VERSION"] = (const char*)(glGetString(GL_VERSION));
info["LIBCURL_VERSION"] = LLCurl::getVersionString();
info["J2C_VERSION"] = LLImageJ2C::getEngineInfo();

View File

@ -37,6 +37,9 @@
#include "llviewercontrol.h"
#include "llviewerregion.h" // getCapability()
#include "llworld.h"
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0d)
#include "rlvhandler.h"
// [/RLVa:KB]
// Linden libraries
#include "llavatarnamecache.h" // IDEVO
@ -255,6 +258,21 @@ void LLFloaterAvatarPicker::onRangeAdjust()
void LLFloaterAvatarPicker::onList()
{
getChildView("ok_btn")->setEnabled(isSelectBtnEnabled());
// [RLVa:KB] - Checked: 2010-06-05 (RLVa-1.2.0d) | Modified: RLVa-1.2.0d
if (rlv_handler_t::isEnabled())
{
LLTabContainer* pTabs = getChild<LLTabContainer>("ResidentChooserTabs");
LLPanel* pNearMePanel = getChild<LLPanel>("NearMePanel");
if ( (pTabs) && (pNearMePanel) )
{
bool fRlvEnable = !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES);
pTabs->enableTabButton(pTabs->getIndexForPanel(pNearMePanel), fRlvEnable);
if ( (!fRlvEnable) && (pTabs->getCurrentPanel() == pNearMePanel) )
pTabs->selectTabByName("SearchPanel");
}
}
// [/RLVa:KB]
}
void LLFloaterAvatarPicker::populateNearMe()

View File

@ -40,6 +40,9 @@
#include "llviewercontrol.h"
#include "llviewerobject.h"
#include "lluictrlfactory.h"
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b)
#include "rlvhandler.h"
// [/RLVa:KB]
//LLFloaterInspect* LLFloaterInspect::sInstance = NULL;
@ -112,7 +115,16 @@ void LLFloaterInspect::onClickCreatorProfile()
LLSelectNode* node = mObjectSelection->getFirstNode(&func);
if(node)
{
LLAvatarActions::showProfile(node->mPermissions->getCreator());
// LLAvatarActions::showProfile(node->mPermissions->getCreator());
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Modified: RLVa-1.0.0e
const LLUUID& idCreator = node->mPermissions->getCreator();
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) &&
((node->mPermissions->getOwner() == idCreator) || (RlvUtil::isNearbyAgent(idCreator))) )
{
return;
}
LLAvatarActions::showProfile(idCreator);
// [/RLVa:KB]
}
}
}
@ -138,6 +150,10 @@ void LLFloaterInspect::onClickOwnerProfile()
if(node)
{
const LLUUID& owner_id = node->mPermissions->getOwner();
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Modified: RLVa-1.0.0e
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
return;
// [/RLVa:KB]
LLAvatarActions::showProfile(owner_id);
}
}
@ -147,8 +163,13 @@ void LLFloaterInspect::onSelectObject()
{
if(LLFloaterInspect::getSelectedUUID() != LLUUID::null)
{
getChildView("button owner")->setEnabled(true);
// getChildView("button owner")->setEnabled(true);
// getChildView("button creator")->setEnabled(true);
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Modified: RLVa-1.0.0e
getChildView("button owner")->setEnabled(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES));
// 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]
}
}
@ -210,6 +231,18 @@ void LLFloaterInspect::refresh()
owner_name = av_name.getCompleteName();
LLAvatarNameCache::get(obj->mPermissions->getCreator(), &av_name);
creator_name = av_name.getCompleteName();
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Modified: RLVa-1.2.1b
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
{
if (!obj->mPermissions->isGroupOwned())
owner_name = RlvStrings::getAnonym(owner_name);
const LLUUID& idCreator = obj->mPermissions->getCreator();
if ( (obj->mPermissions->getOwner() == idCreator) || (RlvUtil::isNearbyAgent(idCreator)) )
creator_name = RlvStrings::getAnonym(creator_name);
}
// [/RLVa:KB]
row["id"] = obj->getObject()->getID();
row["columns"][0]["column"] = "object_name";

View File

@ -103,6 +103,9 @@
#include "llviewermedia.h"
#include "llpluginclassmedia.h"
#include "llteleporthistorystorage.h"
// [RLVa:KB] - Checked: 2010-03-18 (RLVa-1.2.0a)
#include "rlvhandler.h"
// [/RLVa:KB]
#include "lllogininstance.h" // to check if logged in yet
@ -844,6 +847,11 @@ void LLFloaterPreference::refreshEnabledState()
LLComboBox* ctrl_reflections = getChild<LLComboBox>("Reflections");
LLRadioGroup* radio_reflection_detail = getChild<LLRadioGroup>("ReflectionDetailRadio");
// [RLVa:KB] - Checked: 2010-04-09 (RLVa-1.2.0e) | Modified: RLVa-1.2.0e
if (rlv_handler_t::isEnabled())
childSetEnabled("busy_response", !gRlvHandler.hasBehaviour(RLV_BHVR_SENDIM));
// [/RLVa:KB]
// Reflections
BOOL reflections = gSavedSettings.getBOOL("VertexShaderEnable")
&& gGLManager.mHasCubeMap
@ -881,8 +889,14 @@ void LLFloaterPreference::refreshEnabledState()
// radio set for terrain detail mode
LLRadioGroup* mRadioTerrainDetail = getChild<LLRadioGroup>("TerrainDetailRadio"); // can be linked with control var
ctrl_shader_enable->setEnabled(LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable"));
// ctrl_shader_enable->setEnabled(LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable"));
// [RLVa:KB] - Checked: 2010-03-18 (RLVa-1.2.0a) | Modified: RLVa-0.2.0a
// "Basic Shaders" can't be disabled - but can be enabled - under @setenv=n
bool fCtrlShaderEnable = LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable");
ctrl_shader_enable->setEnabled(
fCtrlShaderEnable && ((!gRlvHandler.hasBehaviour(RLV_BHVR_SETENV)) || (!gSavedSettings.getBOOL("VertexShaderEnable"))) );
// [/RLVa:KB]
BOOL shaders = ctrl_shader_enable->get();
if (shaders)
{
@ -899,7 +913,13 @@ void LLFloaterPreference::refreshEnabledState()
// *HACK just checks to see if we can use shaders...
// maybe some cards that use shaders, but don't support windlight
ctrl_wind_light->setEnabled(ctrl_shader_enable->getEnabled() && shaders);
// ctrl_wind_light->setEnabled(ctrl_shader_enable->getEnabled() && shaders);
// [RLVa:KB] - Checked: 2010-03-18 (RLVa-1.2.0a) | Modified: RLVa-0.2.0a
// "Atmospheric Shaders" can't be disabled - but can be enabled - under @setenv=n
bool fCtrlWindLightEnable = fCtrlShaderEnable && shaders;
ctrl_wind_light->setEnabled(
fCtrlWindLightEnable && ((!gRlvHandler.hasBehaviour(RLV_BHVR_SETENV)) || (!gSavedSettings.getBOOL("WindLightUseAtmosShaders"))) );
// [/RLVa:KB]
//Deferred/SSAO/Shadows
LLCheckBoxCtrl* ctrl_deferred = getChild<LLCheckBoxCtrl>("UseLightShaders");

View File

@ -58,6 +58,9 @@
#include "lluictrlfactory.h"
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b)
#include "rlvhandler.h"
// [/RLVa:KB]
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLPropertiesObserver
@ -278,6 +281,16 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
getChildView("BtnCreator")->setEnabled(TRUE);
getChildView("LabelCreatorTitle")->setEnabled(TRUE);
getChildView("LabelCreatorName")->setEnabled(TRUE);
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Modified: RLVa-1.0.0e
// If the object creator matches the object owner we need to anonimize the creator field as well
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) &&
( ((perm.isOwned()) && (!perm.isGroupOwned()) && (perm.getOwner() == item->getCreatorUUID()) ) ||
(RlvUtil::isNearbyAgent(item->getCreatorUUID())) ) )
{
childSetEnabled("BtnCreator", FALSE);
name = RlvStrings::getAnonym(name);
}
// [/RLVa:KB]
getChild<LLUICtrl>("LabelCreatorName")->setValue(name);
}
else
@ -301,8 +314,15 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
else
{
gCacheName->getFullName(perm.getOwner(), name);
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Modified: RLVa-1.0.0e
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
name = RlvStrings::getAnonym(name);
// [/RLVa:KB]
}
getChildView("BtnOwner")->setEnabled(TRUE);
// getChildView("BtnOwner")->setEnabled(TRUE);
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Added: RLVa-1.0.0e
getChildView("BtnOwner")->setEnabled(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES));
// [/RLVa:KB]
getChildView("LabelOwnerTitle")->setEnabled(TRUE);
getChildView("LabelOwnerName")->setEnabled(TRUE);
getChild<LLUICtrl>("LabelOwnerName")->setValue(name);
@ -539,6 +559,17 @@ void LLFloaterProperties::onClickCreator()
if(!item) return;
if(!item->getCreatorUUID().isNull())
{
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Added: RLVa-1.2.1b
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
{
const LLPermissions& perm = item->getPermissions();
if ( ((perm.isOwned()) && (!perm.isGroupOwned()) && (perm.getOwner() == item->getCreatorUUID()) ) ||
(RlvUtil::isNearbyAgent(item->getCreatorUUID())) )
{
return;
}
}
// [/RLVa:KB]
LLAvatarActions::showProfile(item->getCreatorUUID());
}
}
@ -554,6 +585,10 @@ void LLFloaterProperties::onClickOwner()
}
else
{
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Modified: RLVa-1.0.0e
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
return;
// [/RLVa:KB]
LLAvatarActions::showProfile(item->getPermissions().getOwner());
}
}

View File

@ -254,6 +254,14 @@ void LLFloaterReporter::getObjectInfo(const LLUUID& object_id)
if (regionp)
{
getChild<LLUICtrl>("sim_field")->setValue(regionp->getName());
// [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a)
/*
if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) )
{
childSetText("sim_field", RlvStrings::getString(RLV_STRING_HIDDEN_REGION));
}
*/
// [/RLVa:KB]
LLVector3d global_pos;
global_pos.setVec(objectp->getPositionRegion());
setPosBox(global_pos);

View File

@ -34,6 +34,10 @@
#include "llcolorswatch.h"
#include "llviewercontrol.h"
#include "lltexteditor.h"
// [RLVa:KB] - Checked: 2010-03-18 (RLVa-1.2.0a)
#include "rlvhandler.h"
#include "rlvextensions.h"
// [/RLVa:KB]
LLFloaterSettingsDebug::LLFloaterSettingsDebug(const LLSD& key)
@ -209,6 +213,33 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp)
if (controlp)
{
// [RLVa:KB] - Checked: 2010-03-18 (RLVa-1.2.0e) | Modified: RLVa-0.2.1d
// TODO-RLVa: [RLVa-1.2.1] Look into rewriting the whole debug setting blocking code
if (rlv_handler_t::isEnabled())
{
// Don't allow changing DBG_WRITE debug settings under @setdebug=n
bool fEnable = !( (gRlvHandler.hasBehaviour(RLV_BHVR_SETDEBUG)) &&
(RlvExtGetSet::getDebugSettingFlags(controlp->getName()) & RlvExtGetSet::DBG_WRITE) );
// Don't allow toggling "Basic Shaders" and/or "Atmopsheric Shaders" through the debug settings under @setenv=n
fEnable &= !((gRlvHandler.hasBehaviour(RLV_BHVR_SETENV)) &&
(("VertexShaderEnable" == controlp->getName()) || ("WindLightUseAtmosShaders" == controlp->getName())));
#ifdef RLV_EXTENSION_STARTLOCATION
// Don't allow toggling RestrainedLoveLoginLastLocation
fEnable &= !(RLV_SETTING_LOGINLASTLOCATION == controlp->getName());
#endif // RLV_EXTENSION_STARTLOCATION
// NOTE: this runs per-frame so there's no need to explictly handle onCommitSettings() or onClickDefault()
spinner1->setEnabled(fEnable);
spinner2->setEnabled(fEnable);
spinner3->setEnabled(fEnable);
spinner4->setEnabled(fEnable);
color_swatch->setEnabled(fEnable);
childSetEnabled("val_text", fEnable);
childSetEnabled("boolean_combo", fEnable);
childSetEnabled("default_btn", fEnable);
}
// [/RLVa:KB]
eControlType type = controlp->type();
//hide combo box only for non booleans, otherwise this will result in the combo box closing every frame

View File

@ -269,6 +269,17 @@ void LLFloaterWindLight::syncMenu()
LLWLParamSet& currentParams = param_mgr->mCurParams;
//std::map<std::string, LLVector4> & currentParams = param_mgr->mCurParams.mParamValues;
// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g)
/*
// Fixes LL "bug" (preset name isn't kept synchronized)
LLComboBox* comboBox = getChild<LLComboBox>("WLPresetsCombo");
if (comboBox->getSelectedItemLabel() != currentParams.mName)
{
comboBox->setSimple(currentParams.mName);
}
*/
// [/RLVa:KB]
// blue horizon
param_mgr->mBlueHorizon = currentParams.getVector(param_mgr->mBlueHorizon.mName, err);
getChild<LLUICtrl>("WLBlueHorizonR")->setValue(param_mgr->mBlueHorizon.r / 2.0);

View File

@ -75,6 +75,10 @@
#include "llwindow.h" // copyTextToClipboard()
// [RLVa:KB] - Checked: 2010-08-22 (RLVa-1.2.1a)
#include "rlvhandler.h"
// [/RLVa:KB]
//---------------------------------------------------------------------------
// Constants
//---------------------------------------------------------------------------
@ -433,6 +437,10 @@ void LLFloaterWorldMap::draw()
// getChildView("Clear")->setEnabled((BOOL)tracking_status);
getChildView("Show Destination")->setEnabled((BOOL)tracking_status || LLWorldMap::getInstance()->isTracking());
getChildView("copy_slurl")->setEnabled((mSLURL.isValid()) );
// [RLVa:KB] - Checked: 2010-08-22 (RLVa-1.2.1a) | Added: RLVa-1.2.1a
childSetEnabled("Go Home",
(!rlv_handler_t::isEnabled()) || !(gRlvHandler.hasBehaviour(RLV_BHVR_TPLM) && gRlvHandler.hasBehaviour(RLV_BHVR_TPLOC)));
// [/RLVa:KB]
setMouseOpaque(TRUE);
getDragHandle()->setMouseOpaque(TRUE);
@ -715,6 +723,16 @@ void LLFloaterWorldMap::updateLocation()
{ // Empty SLURL will disable the "Copy SLURL to clipboard" button
mSLURL = LLSLURL();
}
// [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a)
/*
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
{
childSetValue("location", RlvStrings::getString(RLV_STRING_HIDDEN_REGION));
mSLURL.clear();
}
*/
// [/RLVa:KB]
}
}

View File

@ -46,6 +46,10 @@
#include "llrecentpeople.h"
#include "llviewerobjectlist.h"
#include "llvoavatarself.h"
// [RLVa:KB] - Checked: 2010-03-04 (RLVa-1.2.0a)
#include "rlvhandler.h"
#include "rlvui.h"
// [/RLVa:KB]
// MAX ITEMS is based on (sizeof(uuid)+2) * count must be < MTUBYTES
// or 18 * count < 1200 => count < 1200/18 => 66. I've cut it down a
@ -300,6 +304,20 @@ 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.0h) | Modified: RLVa-1.2.0h
else if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (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
std::string strName, strMsgName = "inventory_item_offered-im"; LLSD args;
if (gCacheName->getFullName(to_agent, strName))
{
args["NAME"] = RlvStrings::getAnonym(strName);
strMsgName = "inventory_item_offered_rlv";
}
gIMMgr->addSystemMessage(LLUUID::null, strMsgName, args);
}
// [/RLVa:KB]
// If this item was given by drag-and-drop on avatar while IM panel was open, log this action in the IM panel chat.
else if (LLIMModel::getInstance()->findIMSession(session_id))
{
@ -397,7 +415,15 @@ void LLGiveInventory::commitGiveInventoryItem(const LLUUID& to_agent,
logInventoryOffer(to_agent, im_session_id);
// add buddy to recent people list
LLRecentPeople::instance().add(to_agent);
// LLRecentPeople::instance().add(to_agent);
// [RLVa:KB] - Checked: 2010-04-21 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
// Block the recent activity update if this was an in-world drop on an avatar (as opposed to a drop on an IM session or on a profile)
if ( (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) || (im_session_id.notNull()) || (!RlvUtil::isNearbyAgent(to_agent)) ||
(RlvUIEnabler::hasOpenProfile(to_agent)) )
{
LLRecentPeople::instance().add(to_agent);
}
// [/RLVa:KB]
}
// static
@ -452,7 +478,15 @@ void LLGiveInventory::commitGiveInventoryCategory(const LLUUID& to_agent,
<< cat->getUUID() << llendl;
// add buddy to recent people list
LLRecentPeople::instance().add(to_agent);
// LLRecentPeople::instance().add(to_agent);
// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
// Block the recent activity update if this was an in-world drop on an avatar (as opposed to a drop on an IM session or on a profile)
if ( (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) || (im_session_id.notNull()) || (!RlvUtil::isNearbyAgent(to_agent)) ||
(RlvUIEnabler::hasOpenProfile(to_agent)) )
{
LLRecentPeople::instance().add(to_agent);
}
// [/RLVa:KB]
// Test out how many items are being given.
LLViewerInventoryCategory::cat_array_t cats;

View File

@ -62,6 +62,9 @@
#include "llresmgr.h"
#include "pipeline.h"
#include "llspatialpartition.h"
// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e)
#include "rlvhandler.h"
// [/RLVa:KB]
// Height of the yellow selection highlight posts for land
const F32 PARCEL_POST_HEIGHT = 0.666f;
@ -69,6 +72,13 @@ const F32 PARCEL_POST_HEIGHT = 0.666f;
// Returns true if you got at least one object
void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask)
{
// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Modified: RLVa-1.1.0l
if ( (rlv_handler_t::isEnabled()) && ((gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_INTERACT))) )
{
return;
}
// [/RLVa:KB]
LLVector3 av_pos = gAgent.getPositionAgent();
F32 select_dist_squared = gSavedSettings.getF32("MaxSelectDistance");
select_dist_squared = select_dist_squared * select_dist_squared;
@ -133,6 +143,27 @@ void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask)
LLViewerCamera::getInstance()->setFar(new_far);
LLViewerCamera::getInstance()->setNear(new_near);
}
// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Modified: RLVa-1.0.0g
if (gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH))
{
// We'll allow drag selection under fartouch, but only within the fartouch range
// (just copy/paste the code above us to make that work, thank you Lindens!)
LLVector3 relative_av_pos = av_pos;
relative_av_pos -= LLViewerCamera::getInstance()->getOrigin();
F32 new_far = relative_av_pos * LLViewerCamera::getInstance()->getAtAxis() + 1.5f;
F32 new_near = relative_av_pos * LLViewerCamera::getInstance()->getAtAxis() - 1.5f;
new_near = llmax(new_near, 0.1f);
LLViewerCamera::getInstance()->setFar(new_far);
LLViewerCamera::getInstance()->setNear(new_near);
// Usurp these two
limit_select_distance = TRUE;
select_dist_squared = 1.5f * 1.5f;
}
// [/RLVa:KB]
LLViewerCamera::getInstance()->setPerspective(FOR_SELECTION,
center_x-width/2, center_y-height/2, width, height,
limit_select_distance);

View File

@ -46,9 +46,11 @@
#include "llstatusbar.h"
#include "llmenugl.h"
#include "pipeline.h"
// [RLVa:KB] - Checked: 2010-03-27 (RLVa-1.2.0b)
#include "rlvhandler.h"
// [/RLVa:KB]
#include <boost/tokenizer.hpp>
const F32 SPRING_STRENGTH = 0.7f;
const F32 RESTORATION_SPRING_TIME_CONSTANT = 0.1f;
const F32 HORIZONTAL_PADDING = 15.f;
@ -273,7 +275,33 @@ void LLHUDText::renderText(BOOL for_select)
void LLHUDText::setString(const std::string &text_utf8)
{
mTextSegments.clear();
addLine(text_utf8, mColor);
// addLine(text_utf8, mColor);
// [RLVa:KB] - Checked: 2010-03-02 (RLVa-1.2.0a) | Modified: RLVa-1.0.0f
// NOTE: setString() is only called for debug beacons and the floating name tags (which we don't want to censor
// because you'd see "(Region hidden) LastName" if you happen to go to a sim who's name is your first name :p
if (rlv_handler_t::isEnabled())
{
std::string text(text_utf8);
if (gRlvHandler.canShowHoverText(mSourceObject))
{
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
RlvUtil::filterLocation(text);
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
RlvUtil::filterNames(text);
}
else
{
text = "";
}
addLine(text, mColor);
}
else
{
addLine(text_utf8, mColor);
}
// [/RLVa:KB]
}
void LLHUDText::clearString()
@ -655,3 +683,18 @@ F32 LLHUDText::LLHUDTextSegment::getWidth(const LLFontGL* font)
return width;
}
}
// [RLVa:KB] - Checked: 2010-03-27 (RLVa-1.2.0b) | Added: RLVa-1.0.0f
void LLHUDText::refreshAllObjectText()
{
for (TextObjectIterator itText = sTextObjects.begin(); itText != sTextObjects.end(); itText++)
{
LLHUDText* pText = *itText;
if ( (pText) && (!pText->mObjText.empty() && ("" != pText->mObjText) ) &&
(pText->mSourceObject) && (LL_PCODE_VOLUME == pText->mSourceObject->getPCode()) )
{
pText->setString(pText->mObjText);
}
}
}
// [/RLVa:KB]

View File

@ -124,6 +124,11 @@ public:
static void reshape();
static void setDisplayText(BOOL flag) { sDisplayText = flag ; }
// [RLVa:KB] - Checked: 2010-03-27 (RLVa-1.2.0b) | Added: RLVa-1.0.0f
const std::string& getObjectText() const { return mObjText; }
void setObjectText(const std::string &utf8string) { mObjText = utf8string; }
static void refreshAllObjectText();
// [/RLVa:KB]
protected:
LLHUDText(const U8 type);
@ -162,6 +167,9 @@ private:
ETextAlignment mTextAlignment;
EVertAlignment mVertAlignment;
BOOL mHidden;
// [RLVa:KB] - Checked: 2010-03-27 (RLVa-1.2.0b) | Added: RLVa-1.0.0f
std::string mObjText;
// [/RLVa:KB]
static BOOL sDisplayText ;
static std::set<LLPointer<LLHUDText> > sTextObjects;

View File

@ -57,6 +57,9 @@
#include "llspeakers.h"
#include "llsidetray.h"
// [RLVa:KB] - Checked: 2010-04-09 (RLVa-1.2.0e)
#include "rlvhandler.h"
// [/RLVa:KB]
static const S32 RECT_PADDING_NOT_INIT = -1;
static const S32 RECT_PADDING_NEED_RECALC = -2;
@ -211,6 +214,56 @@ void LLIMFloater::sendMsg()
std::string utf8_text = wstring_to_utf8str(text);
utf8_text = utf8str_truncate(utf8_text, MAX_MSG_BUF_SIZE - 1);
// [RLVa:KB] - Checked: 2010-04-09 (RLVa-1.2.0e) | Modified: RLVa-1.2.0e
if (gRlvHandler.hasBehaviour(RLV_BHVR_SENDIM))
{
LLIMModel::LLIMSession* pIMSession = LLIMModel::instance().findIMSession(mSessionID);
RLV_ASSERT(pIMSession);
bool fRlvFilter = !pIMSession;
if (pIMSession)
{
switch (pIMSession->mSessionType)
{
case LLIMModel::LLIMSession::P2P_SESSION: // One-on-one IM: allow if recipient is a sendim exception
fRlvFilter = !gRlvHandler.isException(RLV_BHVR_SENDIM, mOtherParticipantUUID);
break;
case LLIMModel::LLIMSession::GROUP_SESSION: // Group chat: allow if group is a sendim exception
fRlvFilter = !gRlvHandler.isException(RLV_BHVR_SENDIM, mSessionID);
break;
case LLIMModel::LLIMSession::ADHOC_SESSION: // Conference chat: allow if all participants are sendim exceptions
{
if (!pIMSession->mSpeakers)
{
fRlvFilter = true;
break;
}
LLSpeakerMgr::speaker_list_t speakers;
pIMSession->mSpeakers->getSpeakerList(&speakers, TRUE);
for (LLSpeakerMgr::speaker_list_t::const_iterator itSpeaker = speakers.begin();
itSpeaker != speakers.end(); ++itSpeaker)
{
const LLSpeaker* pSpeaker = *itSpeaker;
if ( (gAgent.getID() != pSpeaker->mID) && (!gRlvHandler.isException(RLV_BHVR_SENDIM, pSpeaker->mID)) )
{
fRlvFilter = true;
break;
}
}
}
break;
default:
fRlvFilter = true;
break;
}
}
if (fRlvFilter)
utf8_text = RlvStrings::getString(RLV_STRING_BLOCKED_SENDIM);
}
// [/RLVa:KB]
if (mSessionInitialized)
{
LLIMModel::sendMessage(utf8_text, mSessionID,

View File

@ -63,7 +63,9 @@
#include "lltextbox.h"
#include "llviewercontrol.h"
#include "llviewerparcelmgr.h"
// [RLVa:KB] - Checked: 2010-04-09 (RLVa-1.2.0e)
#include "rlvhandler.h"
// [/RLVa:KB]
const static std::string ADHOC_NAME_SUFFIX(" Conference");
@ -3172,6 +3174,20 @@ public:
{
return;
}
// [RLVa:KB] - Checked: 2010-03-23 (RLVa-1.2.0e) | Modified: RLVa-1.2.0a
if (gRlvHandler.hasBehaviour(RLV_BHVR_RECVIM))
{
if (gAgent.isInGroup(session_id)) // Group chat: don't accept the invite if not an exception
{
if (!gRlvHandler.isException(RLV_BHVR_RECVIM, session_id))
return;
}
else if (!gRlvHandler.isException(RLV_BHVR_RECVIM, from_id))// Conference chat: don't block; censor if not an exception
{
message = RlvStrings::getString(RLV_STRING_BLOCKED_RECVIM);
}
}
// [/RLVa:KB]
// standard message, not from system
std::string saved;

View File

@ -37,6 +37,10 @@
#include "llviewermedia.h"
#include "llviewermediafocus.h"
#include "llviewerobjectlist.h" // to select the requested object
// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0c)
#include "rlvhandler.h"
#include "lltoolpie.h"
// [/RLVa:KB]
// Linden libraries
#include "llbutton.h" // setLabel(), not virtual!
@ -378,6 +382,15 @@ void LLInspectObject::updateSitLabel(LLSelectNode* nodep)
{
sit_btn->setLabel( getString("Sit") );
}
// [RLVa:KB] - Checked: 2010-03-06 (RLVa-1.2.0c) | Added: RLVa-1.2.0a
// RELEASE-RLVa: [SL-2.0.0] Make sure we're examining the same object that handle_sit_or_stand() will request a sit for
if (rlv_handler_t::isEnabled())
{
const LLPickInfo& pick = LLToolPie::getInstance()->getPick();
sit_btn->setEnabled( (pick.mObjectID.notNull()) && (gRlvHandler.canSit(pick.getObject(), pick.mObjectOffset)) );
}
// [/RLVa:KB]
}
void LLInspectObject::updateTouchLabel(LLSelectNode* nodep)
@ -473,10 +486,26 @@ void LLInspectObject::updateCreator(LLSelectNode* nodep)
// a clickable link
// Objects cannot be created by a group, so use agent URL format
LLUUID creator_id = nodep->mPermissions->getCreator();
std::string creator_url =
LLSLURL("agent", creator_id, "about").getSLURLString();
args["[CREATOR]"] = creator_url;
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Added: RLVa-1.2.1b
// Only anonimize the creator if they're also the owner or if they're a nearby avie
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) &&
((nodep->mPermissions->getOwner() == creator_id) || (RlvUtil::isNearbyAgent(creator_id))) )
{
// TODO-RLVa: [RLVa-1.2.2] We need to put a callback here in case the name hasn't previously resolved
std::string strFullName;
args["[CREATOR]"] = (gCacheName->getFullName(creator_id, strFullName)) ? RlvStrings::getAnonym(strFullName)
: LLTrans::getString("Unknown");
}
else
{
// [/RLVa:KB]
std::string creator_url =
LLSLURL("agent", creator_id, "about").getSLURLString();
args["[CREATOR]"] = creator_url;
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Added: RLVa-1.2.1b
}
// [/RLVa:KB]
// created by one user but owned by another
std::string owner_url;
LLUUID owner_id;
@ -489,7 +518,21 @@ void LLInspectObject::updateCreator(LLSelectNode* nodep)
else
{
owner_id = nodep->mPermissions->getOwner();
owner_url = LLSLURL("agent", owner_id, "about").getSLURLString();
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Added: RLVa-1.2.1b
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
{
// TODO-RLVa: [RLVa-1.2.2] We need to put a callback here in case the name hasn't previously resolved
std::string strFullName;
owner_url = (gCacheName->getFullName(owner_id, strFullName)) ? RlvStrings::getAnonym(strFullName)
: LLTrans::getString("Unknown");
}
else
{
// [/RLVa:KB]
owner_url = LLSLURL("agent", owner_id, "about").getSLURLString();
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Added: RLVa-1.2.1b
}
// [/RLVa:KB]
}
args["[OWNER]"] = owner_url;

View File

@ -35,6 +35,9 @@
#include "llui.h"
#include "lluictrl.h"
#include "llurlaction.h"
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f)
#include "rlvhandler.h"
// [/RLVa:KB]
//////////////////////////////////////////////////////////////////////////////
// LLInspectRemoteObject
@ -113,7 +116,11 @@ void LLInspectRemoteObject::onOpen(const LLSD& data)
// work out the owner's name
mOwnerLegacyName = "";
if (gCacheName)
// if (gCacheName)
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
mOwnerLegacyName = (data.has("owner_name")) ? data["owner_name"].asString() : "";
if ( (gCacheName) && (mOwnerID.notNull()) )
// [/RLVa:KB]
{
gCacheName->get(mOwnerID, mGroupOwned, // muting
boost::bind(&LLInspectRemoteObject::onNameCache, this, _1, _2, _3));
@ -181,7 +188,10 @@ void LLInspectRemoteObject::update()
owner = LLSLURL("agent", mOwnerID, "about").getSLURLString();
}
}
else
// else
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
else if (owner.empty()) // If "objectim" was subject to @shownames then we passed an anonimized owner name so use that if available
// [/RLVa:KB]
{
owner = LLTrans::getString("Unknown");
}
@ -200,6 +210,14 @@ void LLInspectRemoteObject::update()
// disable the Block button if we don't have the owner ID
getChild<LLUICtrl>("block_btn")->setEnabled(! mOwnerID.isNull());
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
if ( (rlv_handler_t::isEnabled()) && (RlvStrings::getString(RLV_STRING_HIDDEN_REGION) == mSLurl) )
{
getChild<LLUICtrl>("object_slurl")->setValue(mSLurl);
getChild<LLUICtrl>("map_btn")->setEnabled(false);
}
// [/RLVa:KB]
}
//////////////////////////////////////////////////////////////////////////////

View File

@ -68,6 +68,9 @@
#include "llviewerwindow.h"
#include "llvoavatarself.h"
#include "llwearablelist.h"
// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0b)
#include "rlvhandler.h"
// [/RLVa:KB]
typedef std::pair<LLUUID, LLUUID> two_uuids_t;
typedef std::list<two_uuids_t> two_uuids_list_t;
@ -620,6 +623,20 @@ void LLInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
addOpenRightClickMenuOption(items);
items.push_back(std::string("Properties"));
// [RLVa:KB] - Checked: 2010-03-01 (RLVa-1.2.0b) | Modified: RLVa-1.1.0a
if (rlv_handler_t::isEnabled())
{
const LLInventoryObject* pItem = getInventoryObject();
if ( (pItem) &&
( ((LLAssetType::AT_NOTECARD == pItem->getType()) && (gRlvHandler.hasBehaviour(RLV_BHVR_VIEWNOTE))) ||
((LLAssetType::AT_LSL_TEXT == pItem->getType()) && (gRlvHandler.hasBehaviour(RLV_BHVR_VIEWSCRIPT))) ||
((LLAssetType::AT_TEXTURE == pItem->getType()) && (gRlvHandler.hasBehaviour(RLV_BHVR_VIEWTEXTURE))) ) )
{
disabled_items.push_back(std::string("Open"));
}
}
// [/RLVa:KB]
getClipboardEntries(true, items, disabled_items, flags);
}
hide_context_entries(menu, items, disabled_items);
@ -3019,6 +3036,15 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
{
is_movable = FALSE;
}
// [RLVa:KB] - Checked: 2010-05-27 (RLVa-1.2.0h) | Added: RLVa-1.2.0h
if ( (rlv_handler_t::isEnabled()) && (move_is_into_current_outfit) )
{
const LLViewerInventoryItem* pItem = dynamic_cast<const LLViewerInventoryItem*>(inv_item);
is_movable = rlvPredIsWearableItem(pItem);
}
// [/RLVa:KB]
if (move_is_into_trash)
{
is_movable &= inv_item->getIsLinkType() || !get_is_item_worn(inv_item->getUUID());
@ -4130,6 +4156,14 @@ std::string LLObjectBridge::getLabelSuffix() const
void rez_attachment(LLViewerInventoryItem* item, LLViewerJointAttachment* attachment, bool replace)
{
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1a) | Added: RLVa-1.2.1a
// If no attachment point was specified, try looking it up from the item name
if ( (rlv_handler_t::isEnabled()) && (!attachment) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_ANY)) )
{
attachment = RlvAttachPtLookup::getAttachPoint(item);
}
// [/RLVa:KB]
const LLUUID& item_id = item->getLinkedUUID();
// Check for duplicate request.
@ -4164,10 +4198,20 @@ void rez_attachment(LLViewerInventoryItem* item, LLViewerJointAttachment* attach
if (replace &&
(attachment && attachment->getNumObjects() > 0))
{
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1a) | Modified: RLVa-1.2.1a
// Block if we can't "replace wear" what's currently there
if ( (rlv_handler_t::isEnabled()) && ((gRlvAttachmentLocks.canAttach(attachment) & RLV_WEAR_REPLACE) == 0) )
return;
// [/RLVa:KB]
LLNotificationsUtil::add("ReplaceAttachment", LLSD(), payload, confirm_attachment_rez);
}
else
{
// [RLVa:KB] - Checked: 2010-08-07 (RLVa-1.2.0i) | Modified: RLVa-1.2.0i
// Block wearing anything on a non-attachable attachment point
if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.isLockedAttachmentPoint(attach_pt, RLV_LOCK_ADD)) )
return;
// [/RLVa:KB]
LLNotifications::instance().forceResponse(LLNotification::Params("ReplaceAttachment").payload(payload), 0/*YES*/);
}
}
@ -4193,7 +4237,17 @@ bool confirm_attachment_rez(const LLSD& notification, const LLSD& response)
/*
{
U8 attachment_pt = notification["payload"]["attachment_point"].asInteger();
// [RLVa:KB] - Checked: 2010-08-06 (RLVa-1.2.0i) | Added: RLVa-1.2.0i
// NOTE: we're letting our callers decide whether or not to use ATTACHMENT_ADD
if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_ANY)) &&
((!notification["payload"].has("rlv_force")) || (!notification["payload"]["rlv_force"].asBoolean())) )
{
ERlvWearMask eWearAction = (attachment_pt & ATTACHMENT_ADD) ? RLV_WEAR_ADD : RLV_WEAR_REPLACE;
RlvAttachmentLockWatchdog::instance().onWearAttachment(itemp, eWearAction);;
attachment_pt |= ATTACHMENT_ADD;
}
// [/RLVa:KB]
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_RezSingleAttachmentFromInv);
msg->nextBlockFast(_PREHASH_AgentData);
@ -4257,6 +4311,10 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
{
items.push_back(std::string("Wearable And Object Separator"));
items.push_back(std::string("Detach From Yourself"));
// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0a) | Modified: RLVa-1.2.0a
if ( (rlv_handler_t::isEnabled()) && (!gRlvAttachmentLocks.canDetach(item)) )
disabled_items.push_back(std::string("Detach From Yourself"));
// [/RLVa:KB]
}
else if (!isItemInTrash() && !isLinkedObjectInTrash() && !isLinkedObjectMissing() && !isCOFFolder())
{
@ -4275,6 +4333,17 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
disabled_items.push_back(std::string("Attach To"));
disabled_items.push_back(std::string("Attach To HUD"));
}
// [RLVa:KB] - Checked: 2010-09-03 (RLVa-1.2.1a) | Modified: RLVa-1.2.1a
else if (rlv_handler_t::isEnabled())
{
ERlvWearMask eWearMask = gRlvAttachmentLocks.canAttach(item);
if ((eWearMask & RLV_WEAR_REPLACE) == 0)
disabled_items.push_back(std::string("Wearable And Object Wear"));
if ((eWearMask & RLV_WEAR_ADD) == 0)
disabled_items.push_back(std::string("Wearable Add"));
}
// [/RLVa:KB]
LLMenuGL* attach_menu = menu.findChildMenuByName("Attach To", TRUE);
LLMenuGL* attach_hud_menu = menu.findChildMenuByName("Attach To HUD", TRUE);
if (attach_menu
@ -4459,6 +4528,10 @@ void remove_inventory_category_from_avatar_step2( BOOL proceed, LLUUID category_
if (get_is_item_worn(item->getUUID()))
{
/*
// [RLVa:KB] - Checked: 2010-04-04 (RLVa-1.2.0c) | Modified: RLVa-0.2.2a
if ( (rlv_handler_t::isEnabled()) && (!gRlvWearableLocks.canRemove(item)) )
continue;
// [/RLVa:KB]
LLWearableList::instance().getAsset(item->getAssetUUID(),
item->getName(),
item->getType(),
@ -4635,6 +4708,10 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
{
disabled_items.push_back(std::string("Wearable And Object Wear"));
disabled_items.push_back(std::string("Wearable Add"));
// [RLVa:KB] - Checked: 2010-04-04 (RLVa-1.2.0c) | Added: RLVa-1.2.0c
if ( (rlv_handler_t::isEnabled()) && (!gRlvWearableLocks.canRemove(item)) )
disabled_items.push_back(std::string("Take Off"));
// [/RLVa:KB]
}
else
{
@ -4642,6 +4719,17 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
items.push_back(std::string("Wearable Add"));
disabled_items.push_back(std::string("Take Off"));
disabled_items.push_back(std::string("Wearable Edit"));
// [RLVa:KB] - Checked: 2010-06-09 (RLVa-1.2.0g) | Modified: RLVa-1.2.0g
if (rlv_handler_t::isEnabled())
{
ERlvWearMask eWearMask = gRlvWearableLocks.canWear(item);
if ((eWearMask & RLV_WEAR_REPLACE) == 0)
disabled_items.push_back(std::string("Wearable And Object Wear"));
if ((eWearMask & RLV_WEAR_ADD) == 0)
disabled_items.push_back(std::string("Wearable Add"));
}
// [/RLVa:KB]
}
break;
default:
@ -4817,6 +4905,15 @@ void LLWearableBridge::onRemoveFromAvatarArrived(LLWearable* wearable,
{
OnRemoveStruct *on_remove_struct = (OnRemoveStruct*) userdata;
const LLUUID &item_id = gInventory.getLinkedItemID(on_remove_struct->mUUID);
// [RLVa:KB] - Checked: 2010-03-20 (RLVa-1.2.0c) | Modified: RLVa-1.2.0a
if ( (rlv_handler_t::isEnabled()) && ((!wearable) || (!gRlvWearableLocks.canRemove(gInventory.getItem(item_id)))) )
{
delete on_remove_struct;
return;
}
// [/RLVa:KB]
if(wearable)
{
if( get_is_item_worn( item_id ) )
@ -4863,6 +4960,11 @@ void LLWearableBridge::removeAllClothesFromAvatar()
const LLWearable *wearable = gAgentWearables.getWearableFromItemID(item_id);
if (!wearable)
continue;
// [RLVa:KB] - Checked: 2010-05-14 (RLVa-1.2.0g) | Modified: RLVa-1.2.0g
if ( (rlv_handler_t::isEnabled()) && (!gRlvWearableLocks.canRemove(item)) )
continue;
// [/RLVa:KB]
// Find and remove this item from the COF.
LLAppearanceMgr::instance().removeCOFItemLinks(item_id,false);
@ -4871,7 +4973,10 @@ void LLWearableBridge::removeAllClothesFromAvatar()
gInventory.notifyObservers();
// Remove wearables from gAgentWearables
LLAgentWearables::userRemoveAllClothes();
// LLAgentWearables::userRemoveAllClothes();
// [RLVa:KB] - Checked: 2010-05-14 (RLVa-1.2.0g) | Modified: RLVa-1.2.0g
LLAppearanceMgr::instance().updateAppearanceFromCOF();
// [/RLVa:KB]
}
// static

View File

@ -46,6 +46,9 @@
#include "llviewerregion.h"
#include "llcallbacklist.h"
#include "llvoavatarself.h"
// [RLVa:KB] - Checked: RLVa-1.2.0a (2010-03-05)
#include "rlvhandler.h"
// [/RLVa:KB]
//#define DIFF_INVENTORY_FILES
#ifdef DIFF_INVENTORY_FILES
@ -492,6 +495,28 @@ void LLInventoryModel::collectDescendentsIf(const LLUUID& id,
LLViewerInventoryItem* item = NULL;
item_array_t* item_array = get_ptr_in_map(mParentChildItemTree, id);
// Move onto items
if(item_array)
{
S32 count = item_array->count();
for(S32 i = 0; i < count; ++i)
{
item = item_array->get(i);
if(add(NULL, item))
{
items.put(item);
}
}
}
// [RLVa:KB] - Checked: 2010-09-30 (RLVa-1.2.1d) | Added: RLVa-1.2.1d
// The problem is that we want some way for the functor to know that it's being asked to decide on a folder link
// but it won't know that until after it has encountered the folder link item (which doesn't happen until *after*
// it has already collected all items from it the way the code was originally laid out)
// This breaks the "finish collecting all folders before collecting items (top to bottom and then bottom to top)"
// assumption but no functor is (currently) relying on it (and likely never should since it's an implementation detail?)
// [Only LLAppearanceMgr actually ever passes in 'follow_folder_links == TRUE']
// [/RLVa:KB]
// Follow folder links recursively. Currently never goes more
// than one level deep (for current outfit support)
// Note: if making it fully recursive, need more checking against infinite loops.
@ -521,20 +546,6 @@ void LLInventoryModel::collectDescendentsIf(const LLUUID& id,
}
}
}
// Move onto items
if(item_array)
{
S32 count = item_array->count();
for(S32 i = 0; i < count; ++i)
{
item = item_array->get(i);
if(add(NULL, item))
{
items.put(item);
}
}
}
}
void LLInventoryModel::addChangedMaskForLinks(const LLUUID& object_id, U32 mask)
@ -2442,6 +2453,14 @@ void LLInventoryModel::processSaveAssetIntoInventory(LLMessageSystem* msg,
llinfos << "LLInventoryModel::processSaveAssetIntoInventory item"
" not found: " << item_id << llendl;
}
// [RLVa:KB] - Checked: 2010-03-05 (RLVa-1.2.0a) | Added: RLVa-0.2.0e
if (rlv_handler_t::isEnabled())
{
RlvAttachmentLockWatchdog::instance().onSavedAssetIntoInventory(item_id);
}
// [/RLVa:KB]
if(gViewerWindow)
{
gViewerWindow->getWindow()->decBusyCount();
@ -2492,6 +2511,20 @@ void LLInventoryModel::processBulkUpdateInventory(LLMessageSystem* msg, void**)
{
if(tfolder->getParentUUID() == folderp->getParentUUID())
{
// [RLVa:KB] - Checked: 2010-04-18 (RLVa-1.2.0e) | Added: RLVa-1.2.0e
// NOTE-RLVa: not sure if this is a hack or a bug-fix :o
// -> if we rename the folder on the first BulkUpdateInventory message subsequent messages will still contain
// the old folder name and gInventory.updateCategory() below will "undo" the folder name change but on the
// viewer-side *only* so the folder name actually becomes out of sync with what's on the inventory server
// -> so instead we keep the name of the existing folder and only do it for #RLV/~ in case this causes issues
// -> a better solution would be to only do the rename *after* the transaction completes but there doesn't seem
// to be any way to accomplish that either *sighs*
if ( (rlv_handler_t::isEnabled()) && (!folderp->getName().empty()) && (tfolder->getName() != folderp->getName()) &&
((tfolder->getName().find(RLV_PUTINV_PREFIX) == 0)) )
{
tfolder->rename(folderp->getName());
}
// [/RLVa:KB]
update[tfolder->getParentUUID()];
}
else

View File

@ -59,6 +59,9 @@
#include "llviewermenu.h"
#include "llurllineeditorctrl.h"
#include "llagentui.h"
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d)
#include "rlvhandler.h"
// [/RLVa:KB]
//============================================================================
/*
@ -589,16 +592,31 @@ void LLLocationInputCtrl::reshape(S32 width, S32 height, BOOL called_from_parent
void LLLocationInputCtrl::onInfoButtonClicked()
{
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
return;
// [/RLVa:KB]
LLSideTray::getInstance()->showPanel("panel_places", LLSD().with("type", "agent"));
}
void LLLocationInputCtrl::onForSaleButtonClicked()
{
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
return;
// [/RLVa:KB]
handle_buy_land();
}
void LLLocationInputCtrl::onAddLandmarkButtonClicked()
{
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
return;
// [/RLVa:KB]
LLViewerInventoryItem* landmark = LLLandmarkActions::findLandmarkForAgentPos();
// Landmark exists, open it for preview and edit
if(landmark && landmark->getUUID().notNull())
@ -715,6 +733,10 @@ void LLLocationInputCtrl::onTextEditorRightClicked(S32 x, S32 y, MASK mask)
void LLLocationInputCtrl::refresh()
{
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
mInfoBtn->setEnabled(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC));
// [/RLVa:KB]
refreshLocation(); // update location string
refreshParcelIcons();
updateAddLandmarkButton(); // indicate whether current parcel has been landmarked
@ -986,6 +1008,9 @@ void LLLocationInputCtrl::enableAddLandmarkButton(bool val)
// depending on whether current parcel has been landmarked.
void LLLocationInputCtrl::updateAddLandmarkButton()
{
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
mAddLandmarkBtn->setVisible(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC));
// [/RLVa:KB]
enableAddLandmarkButton(LLLandmarkActions::hasParcelLandmark());
}
void LLLocationInputCtrl::updateAddLandmarkTooltip()
@ -1015,6 +1040,9 @@ void LLLocationInputCtrl::updateContextMenu(){
{
landmarkItem->setLabel(LLTrans::getString("EditLandmarkNavBarMenu"));
}
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
landmarkItem->setEnabled(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC));
// [/RLVa:KB]
}
}
void LLLocationInputCtrl::updateWidgetlayout()
@ -1070,17 +1098,24 @@ void LLLocationInputCtrl::onLocationContextMenuItemClicked(const LLSD& userdata)
}
else if (item == "landmark")
{
LLViewerInventoryItem* landmark = LLLandmarkActions::findLandmarkForAgentPos();
if(!landmark)
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
if (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
{
LLSideTray::getInstance()->showPanel("panel_places", LLSD().with("type", "create_landmark"));
}
else
{
LLSideTray::getInstance()->showPanel("panel_places",
LLSD().with("type", "landmark").with("id",landmark->getUUID()));
// [/RLVa:KB]
LLViewerInventoryItem* landmark = LLLandmarkActions::findLandmarkForAgentPos();
if(!landmark)
{
LLSideTray::getInstance()->showPanel("panel_places", LLSD().with("type", "create_landmark"));
}
else
{
LLSideTray::getInstance()->showPanel("panel_places",
LLSD().with("type", "landmark").with("id",landmark->getUUID()));
}
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
}
// [/RLVa:KB]
}
else if (item == "cut")
{

View File

@ -60,6 +60,9 @@
#include "llworld.h"
#include "llui.h"
#include "pipeline.h"
// [RLVa:KB] - Checked: 2010-03-23 (RLVa-1.2.0a)
#include "rlvhandler.h"
// [/RLVa:KB]
const S32 NUM_AXES = 3;
const S32 MOUSE_DRAG_SLOP = 2; // pixels

View File

@ -50,6 +50,9 @@
#include "llviewerparcelmgr.h"
#include "llviewerregion.h"
#include "lltooltip.h"
// [RLVa:KB] - Checked: 2010-03-07 (RLVa-1.2.0c)
#include "rlvhandler.h"
// [/RLVa:KB]
//
// Constants
@ -690,10 +693,17 @@ void LLPanelStandStopFlying::reparent(LLFloaterMove* move_view)
void LLPanelStandStopFlying::onStandButtonClick()
{
LLFirstUse::sit(false);
// [RLVa:KB] - Checked: 2010-03-07 (RLVa-1.2.0c) | Added: RLVa-1.2.0a
if ( (!rlv_handler_t::isEnabled()) || (gRlvHandler.canStand()) )
{
LLFirstUse::sit(false);
LLSelectMgr::getInstance()->deselectAllForStandingUp();
gAgent.setControlFlags(AGENT_CONTROL_STAND_UP);
LLSelectMgr::getInstance()->deselectAllForStandingUp();
gAgent.setControlFlags(AGENT_CONTROL_STAND_UP);
}
// [/RLVa:KB]
// LLSelectMgr::getInstance()->deselectAllForStandingUp();
// gAgent.setControlFlags(AGENT_CONTROL_STAND_UP);
setFocus(FALSE); // EXT-482
mStandButton->setVisible(FALSE); // force visibility changing to avoid seeing Stand & Move buttons at once.

View File

@ -47,11 +47,17 @@
#include "llwindow.h"
#include "llviewerwindow.h"
#include "llrootview.h"
// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0b)
#include "rlvhandler.h"
// [/RLVa:KB]
S32 LLNearbyChatBar::sLastSpecialChatChannel = 0;
// legacy callback glue
void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel);
//void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel);
// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0b) | Modified: RLVa-0.2.2a
void send_chat_from_viewer(std::string utf8_out_text, EChatType type, S32 channel);
// [/RLVa:KB]
static LLDefaultChildRegistry::Register<LLGestureComboList> r("gesture_combo_list");
@ -496,7 +502,10 @@ void LLNearbyChatBar::onChatBoxKeystroke(LLLineEditor* caller, void* userdata)
S32 length = raw_text.length();
if( (length > 0) && (raw_text[0] != '/') ) // forward slash is used for escape (eg. emote) sequences
// if( (length > 0) && (raw_text[0] != '/') ) // forward slash is used for escape (eg. emote) sequences
// [RLVa:KB] - Checked: 2010-03-26 (RLVa-1.2.0b) | Modified: RLVa-1.0.0d
if ( (length > 0) && (raw_text[0] != '/') && (!gRlvHandler.hasBehaviour(RLV_BHVR_REDIRCHAT)) )
// [/RLVa:KB]
{
gAgent.startTyping();
}
@ -709,6 +718,21 @@ void LLNearbyChatBar::sendChatFromViewer(const LLWString &wtext, EChatType type,
utf8_text = utf8str_truncate(utf8_text, MAX_STRING - 1);
}
// [RLVa:KB] - Checked: 2010-03-27 (RLVa-1.2.0b) | Modified: RLVa-1.2.0b
if ( (0 == channel) && (rlv_handler_t::isEnabled()) )
{
// Adjust the (public) chat "volume" on chat and gestures (also takes care of playing the proper animation)
if ( ((CHAT_TYPE_SHOUT == type) || (CHAT_TYPE_NORMAL == type)) && (gRlvHandler.hasBehaviour(RLV_BHVR_CHATNORMAL)) )
type = CHAT_TYPE_WHISPER;
else if ( (CHAT_TYPE_SHOUT == type) && (gRlvHandler.hasBehaviour(RLV_BHVR_CHATSHOUT)) )
type = CHAT_TYPE_NORMAL;
else if ( (CHAT_TYPE_WHISPER == type) && (gRlvHandler.hasBehaviour(RLV_BHVR_CHATWHISPER)) )
type = CHAT_TYPE_NORMAL;
animate &= !gRlvHandler.hasBehaviour( (!RlvUtil::isEmote(utf8_text)) ? RLV_BHVR_REDIRCHAT : RLV_BHVR_REDIREMOTE );
}
// [/RLVa:KB]
// Don't animate for chats people can't hear (chat to scripts)
if (animate && (channel == 0))
{
@ -839,8 +863,57 @@ LLWString LLNearbyChatBar::stripChannelNumber(const LLWString &mesg, S32* channe
}
}
void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel)
//void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel)
// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0b) | Modified: RLVa-0.2.2a
void send_chat_from_viewer(std::string utf8_out_text, EChatType type, S32 channel)
// [/RLVa:KB]
{
// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0b) | Modified: RLVa-1.2.0a
// Only process chat messages (ie not CHAT_TYPE_START, CHAT_TYPE_STOP, etc)
if ( (rlv_handler_t::isEnabled()) && ( (CHAT_TYPE_WHISPER == type) || (CHAT_TYPE_NORMAL == type) || (CHAT_TYPE_SHOUT == type) ) )
{
if (0 == channel)
{
// (We already did this before, but LLChatHandler::handle() calls this directly)
if ( ((CHAT_TYPE_SHOUT == type) || (CHAT_TYPE_NORMAL == type)) && (gRlvHandler.hasBehaviour(RLV_BHVR_CHATNORMAL)) )
type = CHAT_TYPE_WHISPER;
else if ( (CHAT_TYPE_SHOUT == type) && (gRlvHandler.hasBehaviour(RLV_BHVR_CHATSHOUT)) )
type = CHAT_TYPE_NORMAL;
else if ( (CHAT_TYPE_WHISPER == type) && (gRlvHandler.hasBehaviour(RLV_BHVR_CHATWHISPER)) )
type = CHAT_TYPE_NORMAL;
// Redirect chat if needed
if ( ( (gRlvHandler.hasBehaviour(RLV_BHVR_REDIRCHAT) || (gRlvHandler.hasBehaviour(RLV_BHVR_REDIREMOTE)) ) &&
(gRlvHandler.redirectChatOrEmote(utf8_out_text)) ) )
{
return;
}
// Filter public chat if sendchat restricted
if (gRlvHandler.hasBehaviour(RLV_BHVR_SENDCHAT))
gRlvHandler.filterChat(utf8_out_text, true);
}
else
{
// Don't allow chat on a non-public channel if sendchannel restricted (unless the channel is an exception)
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SENDCHANNEL)) && (!gRlvHandler.isException(RLV_BHVR_SENDCHANNEL, channel)) )
return;
// Don't allow chat on debug channel if @sendchat, @redirchat or @rediremote restricted (shows as public chat on viewers)
if (CHAT_CHANNEL_DEBUG == channel)
{
bool fIsEmote = RlvUtil::isEmote(utf8_out_text);
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SENDCHAT)) ||
((!fIsEmote) && (gRlvHandler.hasBehaviour(RLV_BHVR_REDIRCHAT))) ||
((fIsEmote) && (gRlvHandler.hasBehaviour(RLV_BHVR_REDIREMOTE))) )
{
return;
}
}
}
}
// [/RLVa:KB]
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_ChatFromViewer);
msg->nextBlockFast(_PREHASH_AgentData);

View File

@ -42,6 +42,10 @@
#include "llfloaterreg.h"//for LLFloaterReg::getTypedInstance
#include "llviewerwindow.h"//for screen channel position
// [RLVa:KB] - Checked: 2010-04-21 (RLVa-1.2.0f)
#include "rlvhandler.h"
// [/RLVa:KB]
//add LLNearbyChatHandler to LLNotificationsUI namespace
using namespace LLNotificationsUI;
@ -477,6 +481,23 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, const LLSD &args)
LLChat& tmp_chat = const_cast<LLChat&>(chat_msg);
// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.0f) | Modified: RLVa-1.2.0f
if (rlv_handler_t::isEnabled())
{
// NOTE-RLVa: we can only filter the *message* here since most everything else will already be part of "args" as well
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) && (!tmp_chat.mRlvLocFiltered) && (CHAT_SOURCE_AGENT != tmp_chat.mSourceType) )
{
RlvUtil::filterLocation(tmp_chat.mText);
tmp_chat.mRlvLocFiltered = TRUE;
}
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (!tmp_chat.mRlvNamesFiltered) && (CHAT_SOURCE_AGENT != tmp_chat.mSourceType) )
{
RlvUtil::filterNames(tmp_chat.mText);
tmp_chat.mRlvNamesFiltered = TRUE;
}
}
// [/RLVa:KB]
LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLNearbyChat>("nearby_chat", LLSD());
{
//sometimes its usefull to have no name at all...
@ -563,6 +584,10 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, const LLSD &args)
notification["source"] = (S32)chat_msg.mSourceType;
notification["chat_type"] = (S32)chat_msg.mChatType;
notification["chat_style"] = (S32)chat_msg.mChatStyle;
// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
if (rlv_handler_t::isEnabled())
notification["show_icon_tooltip"] = !chat_msg.mRlvNamesFiltered;
// [/RLVa:KB]
std::string r_color_name = "White";
F32 r_color_alpha = 1.0f;

View File

@ -59,6 +59,9 @@
#include "llviewerwindow.h"
#include "llworld.h"
#include "llworldmapview.h" // shared draw code
// [RLVa:KB] - Checked: 2010-04-19 (RLVa-1.2.0f)
#include "rlvhandler.h"
// [/RLVa:KB]
static LLDefaultChildRegistry::Register<LLNetMap> r1("net_map");
@ -355,7 +358,11 @@ void LLNetMap::draw()
BOOL show_as_friend = FALSE;
if( i < regionp->mMapAvatarIDs.count())
{
show_as_friend = (LLAvatarTracker::instance().getBuddyInfo(regionp->mMapAvatarIDs.get(i)) != NULL);
// [RLVa:KB] - Checked: 2010-04-19 (RLVa-1.2.0f) | Modified: RLVa-1.2.0f
show_as_friend = (LLAvatarTracker::instance().getBuddyInfo(regionp->mMapAvatarIDs.get(i)) != NULL) &&
(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES));
// [/RLVa:KB]
// show_as_friend = (LLAvatarTracker::instance().getBuddyInfo(regionp->mMapAvatarIDs.get(i)) != NULL);
}
LLWorldMapView::drawAvatar(
pos_map.mV[VX], pos_map.mV[VY],

View File

@ -100,7 +100,13 @@ bool LLOfferHandler::processNotification(const LLSD& notify)
notification->setReusable(LLHandlerUtil::isNotificationReusable(notification));
LLUUID session_id;
if (LLHandlerUtil::canSpawnIMSession(notification))
// if (LLHandlerUtil::canSpawnIMSession(notification))
// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
// Don't spawn a new IM session for inventory offers if this notification was subject to @shownames=n
// RELEASE-RLVa: [SL-2.0.1] Test on every new release to make sure the notification gets routed the way we want it to be
bool fSpawnIM = (LLHandlerUtil::canSpawnIMSession(notification)) && (!notification->getPayload().has("rlv_shownames"));
if (fSpawnIM)
// [/RLVa:KB]
{
const std::string name = LLHandlerUtil::getSubstitutionName(notification);
@ -110,7 +116,12 @@ bool LLOfferHandler::processNotification(const LLSD& notify)
}
bool show_toast = LLHandlerUtil::canSpawnToast(notification);
bool add_notid_to_im = LLHandlerUtil::canAddNotifPanelToIM(notification);
// bool add_notid_to_im = LLHandlerUtil::canAddNotifPanelToIM(notification);
// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
// NOTE: add_notid_to_im needs to be FALSE if we suppressed spawning an IM because in that case the notification needs to
// be routed to the "syswell" or the inventory offer floater will dissapear and the user won't be able to accept it
bool add_notid_to_im = (fSpawnIM) && (LLHandlerUtil::canAddNotifPanelToIM(notification));
// [/RLVa:KB]
if (add_notid_to_im)
{
LLHandlerUtil::addNotifPanelToIM(notification);
@ -149,7 +160,15 @@ bool LLOfferHandler::processNotification(const LLSD& notify)
if (LLHandlerUtil::canLogToIM(notification))
{
// log only to file if notif panel can be embedded to IM and IM is opened
if (add_notid_to_im && LLHandlerUtil::isIMFloaterOpened(notification))
// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
if (notification->getPayload().has("rlv_shownames"))
{
// Log to chat history if this notification was subject to @shownames=n
LLHandlerUtil::logToNearbyChat(notification, CHAT_SOURCE_SYSTEM);
}
else if (add_notid_to_im && LLHandlerUtil::isIMFloaterOpened(notification))
// [/RLVa:KB]
// if (add_notid_to_im && LLHandlerUtil::isIMFloaterOpened(notification))
{
LLHandlerUtil::logToIMP2P(notification, true);
}
@ -170,8 +189,25 @@ bool LLOfferHandler::processNotification(const LLSD& notify)
}
else
{
if (LLHandlerUtil::canAddNotifPanelToIM(notification)
&& !LLHandlerUtil::isIMFloaterOpened(notification))
// if (LLHandlerUtil::canAddNotifPanelToIM(notification)
// && !LLHandlerUtil::isIMFloaterOpened(notification))
// [SL:KB] - Checked: 2010-04-20 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
// Repro:
// 1) have someone drop you 2 inventory items (new IM session will be spawned)
// 2) accept/decline the inventory offers as they come in
// -> unread IM counter shows 0
// 3) toggle "Enable plain text chat history" while the IM session with the inventory offers isn't the active session
// -> unread IM counter shows -2
// -> LLHandlerUtil::decIMMesageCounter() really should be fixed to check for "0" before decreasing the count but
// there are enough bugfixes in RLVa as it is already :(
// Fix:
// - the one and only time we need to decrease the unread IM count is when we've clicked any of the buttons on the *toast*
// - since LLIMFloater::updateMessages() hides the toast when we open the IM (which resets the unread count to 0) we should
// *only* decrease the unread IM count if there's a visible toast since the unread count will be at 0 otherwise anyway
LLScreenChannel* pChannel = dynamic_cast<LLScreenChannel*>(mChannel);
LLToast* pToast = (pChannel) ? pChannel->getToastByNotificationID(notification->getID()) : NULL;
if ( (pToast) && (!pToast->getCanBeStored()) )
// [/SL:KB]
{
LLHandlerUtil::decIMMesageCounter(notification);
}
@ -186,7 +222,11 @@ bool LLOfferHandler::processNotification(const LLSD& notify)
void LLOfferHandler::onDeleteToast(LLToast* toast)
{
if (!LLHandlerUtil::canAddNotifPanelToIM(toast->getNotification()))
// if (!LLHandlerUtil::canAddNotifPanelToIM(toast->getNotification()))
// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
// BUGFIX: LLHandlerUtil::canAddNotifPanelToIM() won't necessarily tell us whether the notification went into an IM or to the syswell
if (toast->getCanBeStored())
// [/RLVa:KB]
{
// send a signal to the counter manager
mDelNotificationSignal();

View File

@ -297,6 +297,13 @@ void LLOverlayBar::onClickMouselook(void*)
//static
void LLOverlayBar::onClickStandUp(void*)
{
// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g)
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) && (gAgent.getAvatarObject()) && (gAgent.getAvatarObject()->mIsSitting) )
{
return;
}
// [/RLVa:KB]
LLSelectMgr::getInstance()->deselectAllForStandingUp();
gAgent.setControlFlags(AGENT_CONTROL_STAND_UP);
}

View File

@ -59,6 +59,9 @@
#include "llviewerregion.h"
#include "llviewerwindow.h"
#include "llworld.h"
// [RLVa:KB] - Checked: 2010-03-31 (RLVa-1.2.0c)
#include "rlvhandler.h"
// [/RLVa:KB]
//
// Imported globals
@ -120,6 +123,25 @@ void LLPanelContents::getState(LLViewerObject *objectp )
&& ( objectp->permYouOwner() || ( !group_id.isNull() && gAgent.isInGroup(group_id) ))); // solves SL-23488
BOOL all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME );
// [RLVa:KB] - Checked: 2010-04-01 (RLVa-1.2.0c) | Modified: RLVa-1.0.5a
if ( (rlv_handler_t::isEnabled()) && (editable) )
{
// Don't allow creation of new scripts if it's non-detachable
if (objectp->isAttachment())
editable = !gRlvAttachmentLocks.isLockedAttachment(objectp->getRootEdit());
// Don't allow creation of new scripts if we're @unsit=n or @sittp=n restricted and we're sitting on the selection
if ( (editable) && ((gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SITTP))) )
{
// Only check the first (non-)root object because nothing else would result in enabling the button (see below)
LLViewerObject* pObj = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject(TRUE);
editable =
(pObj) && (isAgentAvatarValid()) && ((!gAgentAvatarp->isSitting()) || (gAgentAvatarp->getRoot() != pObj->getRootEdit()));
}
}
// [/RLVa:KB]
// Edit script button - ok if object is editable and there's an unambiguous destination for the object.
getChildView("button new script")->setEnabled(
editable &&
@ -154,6 +176,21 @@ void LLPanelContents::onClickNewScript(void *userdata)
LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject(children_ok);
if(object)
{
// [RLVa:KB] - Checked: 2010-03-31 (RLVa-1.2.0c) | Modified: RLVa-1.0.5a
if (rlv_handler_t::isEnabled()) // Fallback code [see LLPanelContents::getState()]
{
if (gRlvAttachmentLocks.isLockedAttachment(object->getRootEdit()))
{
return; // Disallow creating new scripts in a locked attachment
}
else if ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SITTP)) )
{
if ( (isAgentAvatarValid()) && (gAgentAvatarp->isSitting()) && (gAgentAvatarp->getRoot() == object->getRootEdit()) )
return; // .. or in a linkset the avie is sitting on under @unsit=n/@sittp=n
}
}
// [/RLVa:KB]
LLPermissions perm;
perm.init(gAgent.getID(), gAgent.getID(), LLUUID::null, LLUUID::null);
perm.initMasks(

View File

@ -44,6 +44,10 @@
#include "lluictrlfactory.h"
// [RLVa:KB]
#include "rlvhandler.h"
// [/RLVa:KB]
LLPanelLandSelectObserver* LLPanelLandInfo::sObserver = NULL;
LLPanelLandInfo* LLPanelLandInfo::sInstance = NULL;
@ -224,6 +228,14 @@ void LLPanelLandInfo::refresh()
//static
void LLPanelLandInfo::onClickClaim()
{
// [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a)
/*
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
{
return;
}
*/
// [/RLVa:KB]
LLViewerParcelMgr::getInstance()->startBuyLand();
}

View File

@ -68,6 +68,9 @@
#include "llviewercontrol.h"
#include "lluictrlfactory.h"
//#include "llfirstuse.h"
// [RLVa:KB] - Checked: 2010-03-31 (RLVa-1.2.0c)
#include "rlvhandler.h"
// [/RLVa:KB]
#include "lldrawpool.h"
@ -383,6 +386,14 @@ void LLPanelObject::getState( )
enable_rotate = FALSE;
}
// [RLVa:KB] - Checked: 2010-03-31 (RLVa-1.2.0c) | Modified: RLVa-1.0.0g
if ( (rlv_handler_t::isEnabled()) && ((gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SITTP))) )
{
if ( (isAgentAvatarValid()) && (gAgentAvatarp->isSitting()) && (gAgentAvatarp->getRoot() == objectp->getRootEdit()) )
enable_move = enable_scale = enable_rotate = FALSE;
}
// [/RLVa:KB]
LLVector3 vec;
if (enable_move)
{

View File

@ -63,7 +63,10 @@
#include "llviewerregion.h"
#include "llviewerobjectlist.h"
#include "llviewermessage.h"
// [RLVa:KB] - Checked: 2010-03-27 (RLVa-1.2.0b)
#include "rlvhandler.h"
#include "rlvui.h"
// [/RLVa:KB]
///----------------------------------------------------------------------------
/// Class LLTaskInvFVBridge
@ -355,8 +358,16 @@ void LLTaskInvFVBridge::previewItem()
BOOL LLTaskInvFVBridge::isItemRenameable() const
{
if(gAgent.isGodlike()) return TRUE;
// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.0.5a
LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID());
if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.isLockedAttachment(object->getRootEdit())) )
{
return FALSE;
}
// [/RLVa:KB]
if(gAgent.isGodlike()) return TRUE;
// LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID());
if(object)
{
LLInventoryItem* item = (LLInventoryItem*)(object->getInventoryObject(mUUID));
@ -371,7 +382,15 @@ BOOL LLTaskInvFVBridge::isItemRenameable() const
BOOL LLTaskInvFVBridge::renameItem(const std::string& new_name)
{
// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.0.5a
LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID());
if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.isLockedAttachment(object->getRootEdit())) )
{
return FALSE;
}
// [/RLVa:KB]
// LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID());
if(object)
{
LLViewerInventoryItem* item = NULL;
@ -398,12 +417,45 @@ BOOL LLTaskInvFVBridge::isItemMovable() const
// return TRUE;
//}
//return FALSE;
// [RLVa:KB] - Checked: 2010-04-01 (RLVa-1.2.0c) | Modified: RLVa-1.0.5a
if (rlv_handler_t::isEnabled())
{
const LLViewerObject* pObj = gObjectList.findObject(mPanel->getTaskUUID());
if (pObj)
{
if (gRlvAttachmentLocks.isLockedAttachment(pObj->getRootEdit()))
{
return FALSE;
}
else if ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SITTP)) )
{
if ( (isAgentAvatarValid()) && (gAgentAvatarp->isSitting()) && (gAgentAvatarp->getRoot() == pObj->getRootEdit()) )
return FALSE;
}
}
}
// [/RLVa:KB]
return TRUE;
}
BOOL LLTaskInvFVBridge::isItemRemovable() const
{
const LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID());
// [RLVa:KB] - Checked: 2010-04-01 (RLVa-1.2.0c) | Modified: RLVa-1.0.5a
if ( (object) && (rlv_handler_t::isEnabled()) )
{
if (gRlvAttachmentLocks.isLockedAttachment(object->getRootEdit()))
{
return FALSE;
}
else if ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SITTP)) )
{
if ( (isAgentAvatarValid()) && (gAgentAvatarp->isSitting()) && (gAgentAvatarp->getRoot() == object->getRootEdit()) )
return FALSE;
}
}
// [/RLVa:KB]
if(object
&& (object->permModify() || object->permYouOwner()))
{
@ -551,6 +603,13 @@ BOOL LLTaskInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const
const LLPermissions& perm = inv->getPermissions();
bool can_copy = gAgent.allowOperation(PERM_COPY, perm,
GP_OBJECT_MANIPULATE);
// [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.2.1f) | Modified: RLVa-1.0.5a
// Kind of redundant due to the note below, but in case that ever gets fixed
if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.isLockedAttachment(object->getRootEdit())) )
{
return FALSE;
}
// [/RLVa:KB]
if (object->isAttachment() && !can_copy)
{
//RN: no copy contents of attachments cannot be dragged out
@ -669,16 +728,41 @@ void LLTaskInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
{
disabled_items.push_back(std::string("Task Open"));
}
// [RLVa:KB] - Checked: 2010-03-01 (RLVa-1.2.0b) | Modified: RLVa-1.1.0a
else if (rlv_handler_t::isEnabled())
{
LLViewerObject* pAttachObj = gObjectList.findObject(mPanel->getTaskUUID());
bool fLocked = (pAttachObj) ? gRlvAttachmentLocks.isLockedAttachment(pAttachObj->getRootEdit()) : false;
if ( ((LLAssetType::AT_NOTECARD == item->getType()) && ((gRlvHandler.hasBehaviour(RLV_BHVR_VIEWNOTE)) || (fLocked))) ||
((LLAssetType::AT_LSL_TEXT == item->getType()) && ((gRlvHandler.hasBehaviour(RLV_BHVR_VIEWSCRIPT)) || (fLocked))) ||
((LLAssetType::AT_TEXTURE == item->getType()) && (gRlvHandler.hasBehaviour(RLV_BHVR_VIEWTEXTURE))) )
{
disabled_items.push_back(std::string("Task Open"));
}
}
// [/RLVa:KB]
}
items.push_back(std::string("Task Properties"));
if(isItemRenameable())
// if(isItemRenameable())
// {
// items.push_back(std::string("Task Rename"));
// }
// if(isItemRemovable())
// {
// items.push_back(std::string("Task Remove"));
// }
// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Added: RLVa-1.2.1f
items.push_back(std::string("Task Rename"));
items.push_back(std::string("Task Remove"));
if (!isItemRenameable())
{
items.push_back(std::string("Task Rename"));
disabled_items.push_back(std::string("Task Rename"));
}
if(isItemRemovable())
if (!isItemRemovable())
{
items.push_back(std::string("Task Remove"));
disabled_items.push_back(std::string("Task Remove"));
}
// [/RLVa:KB]
hide_context_entries(menu, items, disabled_items);
}
@ -1070,6 +1154,13 @@ void LLTaskLSLBridge::openItem()
{
return;
}
// [RLVa:KB] - Checked: 2010-03-27 (RLVa-1.2.0b) | Modified: RLVa-1.1.0a
if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.isLockedAttachment(object->getRootEdit())) )
{
RlvUIEnabler::notifyBlockedViewXXX(LLAssetType::AT_SCRIPT);
return;
}
// [/RLVa:KB]
if (object->permModify() || gAgent.isGodlike())
{
LLLiveLSLEditor* preview = LLFloaterReg::showTypedInstance<LLLiveLSLEditor>("preview_scriptedit", LLSD(mUUID), TAKE_FOCUS_YES);
@ -1128,6 +1219,13 @@ void LLTaskNotecardBridge::openItem()
{
return;
}
// [RLVa:KB] - Checked: 2010-03-27 (RLVa-1.2.0b) | Modified: RLVa-1.2.0b
if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.isLockedAttachment(object->getRootEdit())) )
{
RlvUIEnabler::notifyBlockedViewXXX(LLAssetType::AT_NOTECARD);
return;
}
// [/RLVa:KB]
if(object->permModify() || gAgent.isGodlike())
{
LLPreviewNotecard* preview = LLFloaterReg::showTypedInstance<LLPreviewNotecard>("preview_notecard", LLSD(mUUID), TAKE_FOCUS_YES);

View File

@ -73,6 +73,9 @@
#include "llwearableitemslist.h"
#include "llwearabletype.h"
#include "llweb.h"
// [RLVa:KB] - Checked: 2010-09-16 (RLVa-1.2.1a)
#include "rlvhandler.h"
// [/RLVa:KB]
static LLRegisterPanelClassWrapper<LLPanelOutfitEdit> t_outfit_edit("panel_outfit_edit");
@ -606,6 +609,10 @@ void LLPanelOutfitEdit::toggleAddWearablesPanel()
void LLPanelOutfitEdit::showAddWearablesPanel(bool show_add_wearables)
{
// [RLVa:KB] - Checked: 2010-09-16 (RLVa-1.2.1a) | Added: RLVa-1.2.1a
show_add_wearables = (show_add_wearables) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWINV));
// [/RLVa:KB]
mAddWearablesPanel->setVisible(show_add_wearables);
getChild<LLUICtrl>("show_add_wearables_btn")->setValue(show_add_wearables);

View File

@ -56,6 +56,12 @@ public:
static LLSidepanelAppearance* getAppearanceSP();
// [RLVa:KB] - Checked: 2010-08-24 (RLVa-1.2.1a) | Added: RLVa-1.2.1a
LLTabContainer* getAppearanceTabs() { return mAppearanceTabs; }
LLOutfitsList* getMyOutfitsPanel() { return mMyOutfitsPanel; }
LLPanelWearing* getCurrentOutfitPanel() { return mCurrentOutfitPanel; }
// [/RLVa:KB]
static LLPanelOutfitsInventory* findInstance();
protected:

View File

@ -63,6 +63,9 @@
#include "llvoiceclient.h"
#include "llworld.h"
#include "llspeakers.h"
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0d)
#include "rlvhandler.h"
// [/RLVa:KB]
#define FRIEND_LIST_UPDATE_TIMEOUT 0.5
#define NEARBY_LIST_UPDATE_INTERVAL 1
@ -541,6 +544,9 @@ BOOL LLPanelPeople::postBuild()
mNearbyList->setNoItemsMsg(getString("no_one_near"));
mNearbyList->setNoFilteredItemsMsg(getString("no_one_filtered_near"));
mNearbyList->setShowIcons("NearbyListShowIcons");
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
mNearbyList->setRlvCheckShowNames(true);
// [/RLVa:KB]
mRecentList = getChild<LLPanel>(RECENT_TAB_NAME)->getChild<LLAvatarList>("avatar_list");
mRecentList->setNoItemsCommentText(getString("no_recent_people"));
@ -848,7 +854,11 @@ void LLPanelPeople::updateButtons()
LLPanel* cur_panel = mTabContainer->getCurrentPanel();
if (cur_panel)
{
cur_panel->getChildView("add_friend_btn")->setEnabled(!is_friend);
// cur_panel->getChildView("add_friend_btn")->setEnabled(!is_friend);
// [RLVa:KB] - Checked: 2010-07-20 (RLVa-1.2.0h) | Added: RLVa-1.2.0h
cur_panel->getChildView("add_friend_btn")->setEnabled(
!is_friend && ((!nearby_tab_active) || (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))));
// [/RLBa:KB]
if (friends_tab_active)
{
cur_panel->getChildView("del_btn")->setEnabled(multiple_selected);
@ -858,6 +868,13 @@ void LLPanelPeople::updateButtons()
bool enable_calls = LLVoiceClient::getInstance()->isVoiceWorking() && LLVoiceClient::getInstance()->voiceEnabled();
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0d) | Modified: RLVa-1.2.0d
if ( (nearby_tab_active) && (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) )
{
item_selected = multiple_selected = false;
}
// [/RLBa:KB]
buttonSetEnabled("view_profile_btn",item_selected);
buttonSetEnabled("share_btn", item_selected);
buttonSetEnabled("im_btn", multiple_selected); // allow starting the friends conference for multiple selection

View File

@ -55,6 +55,10 @@ public:
// when voice is available
/*virtual*/ void onChange(EStatusType status, const std::string &channelURI, bool proximal);
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
LLAvatarList* getNearbyList() { return mNearbyList; }
// [/RLVa:KB]
// internals
class Updater;

View File

@ -62,7 +62,9 @@
#include "llspinctrl.h"
#include "roles_constants.h"
#include "llgroupactions.h"
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b)
#include "rlvhandler.h"
// [/RLVa:KB]
U8 string_value_to_click_action(std::string p_value);
std::string click_action_to_string_value( U8 action);
@ -329,8 +331,9 @@ void LLPanelPermissions::refresh()
creators_identical = LLSelectMgr::getInstance()->selectGetCreator(mCreatorID,
creator_name);
getChild<LLUICtrl>("Creator Name")->setValue(creator_name);
getChildView("Creator Name")->setEnabled(TRUE);
// getChild<LLUICtrl>("Creator Name")->setValue(creator_name);
// getChildView("Creator Name")->setEnabled(TRUE);
// [RLVa:KB] - Moved further down to avoid an annoying flicker when the text is set twice in a row
// Update owner text field
getChildView("Owner:")->setEnabled(TRUE);
@ -358,8 +361,28 @@ void LLPanelPermissions::refresh()
}
}
}
// getChild<LLUICtrl>("Owner Name")->setValue(owner_name);
// getChildView("Owner Name")->setEnabled(TRUE);
// [RLVa:KB] - Moved further down to avoid an annoying flicker when the text is set twice in a row
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Modified: RLVa-1.2.1b
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
{
// Only anonimize the creator if all of the selection was created by the same avie who's also the owner or they're a nearby avie
if ( (creators_identical) && ((mCreatorID == mOwnerID) || (RlvUtil::isNearbyAgent(mCreatorID))) )
creator_name = RlvStrings::getAnonym(creator_name);
// Only anonimize 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()) )
owner_name = RlvStrings::getAnonym(owner_name);
}
getChild<LLUICtrl>("Creator Name")->setValue(creator_name);
getChildView("Creator Name")->setEnabled(TRUE);
getChild<LLUICtrl>("Owner Name")->setValue(owner_name);
getChildView("Owner Name")->setEnabled(TRUE);
// [/RLVa:KB]
// update group text field
getChildView("Group:")->setEnabled(TRUE);

View File

@ -51,6 +51,9 @@
#include "llviewercontrol.h"
#include "llviewerparcelmgr.h"
#include "llviewerregion.h"
// [RLVa:KB] - Checked: 2010-09-02 (RLVa-1.2.1b)
#include "rlvhandler.h"
// [/RLVa:KB]
static LLRegisterPanelClassWrapper<LLPanelPlaceProfile> t_place_profile("panel_place_profile");
@ -546,7 +549,10 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel,
mLastSelectedRegionID = region->getRegionID();
LLPanelPlaceInfo::processParcelInfo(parcel_data);
mYouAreHerePanel->setVisible(is_current_parcel);
// mYouAreHerePanel->setVisible(is_current_parcel);
// [RLVa:KB] - Checked: 2010-09-02 (RLVa-1.2.1b) | Added: RLVa-1.2.1b
mYouAreHerePanel->setVisible(is_current_parcel && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)));
// [/RLVa:KB]
getChild<LLAccordionCtrlTab>("sales_tab")->setVisible(for_sale);
}
@ -613,6 +619,9 @@ void LLPanelPlaceProfile::updateYouAreHereBanner(void* userdata)
BOOL display_banner = gAgent.getRegion()->getRegionID() == self->mLastSelectedRegionID &&
LLAgentUI::checkAgentDistance(self->mPosRegion, radius);
self->mYouAreHerePanel->setVisible(display_banner);
// self->mYouAreHerePanel->setVisible(display_banner);
// [RLVa:KB] - Checked: 2010-09-02 (RLVa-1.2.1b) | Added: RLVa-1.2.1b
self->mYouAreHerePanel->setVisible(display_banner && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)));
// [/RLVa:KB]
}
}

View File

@ -52,6 +52,10 @@ public:
S32 notifyParent(const LLSD& info);
// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.0f) | Added: RVLa-1.2.0f
const LLUUID& getAvatarId() const { return mAvatarId; }
// [/RLVa:KB]
protected:
LLPanelProfile();
@ -62,7 +66,7 @@ protected:
LLTabContainer* getTabCtrl() { return mTabCtrl; }
const LLUUID& getAvatarId() { return mAvatarId; }
// const LLUUID& getAvatarId() { return mAvatarId; }
void setAvatarId(const LLUUID& avatar_id) { mAvatarId = avatar_id; }

View File

@ -83,6 +83,9 @@
#include "lltrans.h"
#include "llviewercontrol.h"
#include "llappviewer.h"
// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f)
#include "rlvhandler.h"
// [/RLVa:KB]
const std::string HELLO_LSL =
"default\n"
@ -1701,6 +1704,13 @@ void LLLiveLSLEditor::onRunningCheckboxClicked( LLUICtrl*, void* userdata )
//self->mRunningCheckbox->get();
if( object )
{
// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.0.5a
if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.isLockedAttachment(object->getRootEdit())) )
{
return;
}
// [/RLVa:KB]
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_SetScriptRunning);
msg->nextBlockFast(_PREHASH_AgentData);
@ -1726,6 +1736,13 @@ void LLLiveLSLEditor::onReset(void *userdata)
LLViewerObject* object = gObjectList.findObject( self->mObjectUUID );
if(object)
{
// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.0.5a
if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.isLockedAttachment(object->getRootEdit())) )
{
return;
}
// [/RLVa:KB]
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_ScriptReset);
msg->nextBlockFast(_PREHASH_AgentData);
@ -2134,6 +2151,15 @@ void LLLiveLSLEditor::onLoad(void* userdata)
void LLLiveLSLEditor::onSave(void* userdata, BOOL close_after_save)
{
LLLiveLSLEditor* self = (LLLiveLSLEditor*)userdata;
// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.0.5a
const LLViewerObject* pObject = gObjectList.findObject(self->mObjectUUID);
if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.isLockedAttachment(pObject->getRootEdit())) )
{
return;
}
// [/RLVa:KB]
self->mCloseAfterSave = close_after_save;
self->saveIfNeeded();
}

View File

@ -866,8 +866,18 @@ LLToast* LLScreenChannel::getToastByNotificationID(LLUUID id)
std::vector<ToastElem>::iterator it = find(mStoredToastList.begin(),
mStoredToastList.end(), id);
// if (it == mStoredToastList.end())
// return NULL;
// [SL:KB] - Checked: 2010-04-21 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
// BUGFIX-SL: we need to get the visible toast in LLOfferHandler::processNotification() whether it's "stored" or not
if (it == mStoredToastList.end())
return NULL;
{
// If we can't find it among the stored toasts then widen it to "all visible toasts"
it = find(mToastList.begin(), mToastList.end(), id);
if (it == mToastList.end())
return NULL;
}
// [/SL:KB]
return it->toast;
}

View File

@ -87,6 +87,9 @@
#include "llvoavatarself.h"
#include "llvovolume.h"
#include "pipeline.h"
// [RLVa:KB] - Checked: 2010-03-23 (RLVa-1.2.0a)
#include "rlvhandler.h"
// [/RLVa:KB]
#include "llglheaders.h"
@ -2737,6 +2740,16 @@ BOOL LLSelectMgr::selectGetPermissions(LLPermissions& result_perm)
void LLSelectMgr::selectDelete()
{
// [RLVa:KB] - Checked: 2010-03-23 (RLVa-1.2.0e) | Added: RLVa-1.2.0a
if ( (rlv_handler_t::isEnabled()) && (!rlvCanDeleteOrReturn()) )
{
make_ui_sound("UISndInvalidOp");
if (!gFloaterTools->getVisible())
deselectAll();
return;
}
// [/RLVa:KB]
S32 deleteable_count = 0;
BOOL locked_but_deleteable_object = FALSE;
@ -3049,7 +3062,10 @@ struct LLDuplicateData
void LLSelectMgr::selectDuplicate(const LLVector3& offset, BOOL select_copy)
{
if (mSelectedObjects->isAttachment())
// if (mSelectedObjects->isAttachment())
// [RLVa:KB] - Checked: 2010-03-24 (RLVa-1.2.0e) | Added: RLVa-1.2.0a
if ( (mSelectedObjects->isAttachment()) || ((rlv_handler_t::isEnabled()) && (!rlvCanDeleteOrReturn())) )
// [/RLVa:KB]
{
//RN: do not duplicate attachments
make_ui_sound("UISndInvalidOp");
@ -3503,11 +3519,38 @@ void LLSelectMgr::convertTransient()
void LLSelectMgr::deselectAllIfTooFar()
{
// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Added: RLVa-1.2.0e
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) && (!mSelectedObjects->isEmpty()) )
{
struct NotTransientOrFocusedMedia : public LLSelectedNodeFunctor
{
bool apply(LLSelectNode* node)
{
return (node) && (node->getObject()) &&
( (!node->isTransient()) && (node->getObject()->getID() != LLViewerMediaFocus::getInstance()->getFocusedObjectID()) );
}
} f;
if (mSelectedObjects->getFirstRootNode(&f, TRUE))
deselectAll();
}
// [/RLVa:KB]
if (mSelectedObjects->isEmpty() || mSelectedObjects->mSelectType == SELECT_TYPE_HUD)
{
return;
}
// [RLVa:KB] - Checked: 2010-05-03 (RLVa-1.2.0g) | Modified: RLVa-1.1.0l
#ifdef RLV_EXTENSION_CMD_INTERACT
// [Fall-back code] Don't allow an active selection (except for HUD attachments - see above) when @interact=n restricted
if (gRlvHandler.hasBehaviour(RLV_BHVR_INTERACT))
{
deselectAll();
return;
}
#endif // RLV_EXTENSION_CMD_INTERACT
// [/RLVa:KB]
// HACK: Don't deselect when we're navigating to rate an object's
// owner or creator. JC
if (gMenuObject->getVisible())
@ -3516,13 +3559,20 @@ void LLSelectMgr::deselectAllIfTooFar()
}
LLVector3d selectionCenter = getSelectionCenterGlobal();
if (gSavedSettings.getBOOL("LimitSelectDistance")
// if (gSavedSettings.getBOOL("LimitSelectDistance")
// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Modified: RLVa-0.2.0f
BOOL fRlvFartouch = gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH) && gFloaterTools->getVisible();
if ( (gSavedSettings.getBOOL("LimitSelectDistance") || (fRlvFartouch) )
// [/RLVa:KB]
&& (!mSelectedObjects->getPrimaryObject() || !mSelectedObjects->getPrimaryObject()->isAvatar())
&& (mSelectedObjects->getPrimaryObject() != LLViewerMediaFocus::getInstance()->getFocusedObject())
&& !mSelectedObjects->isAttachment()
&& !selectionCenter.isExactlyZero())
{
F32 deselect_dist = gSavedSettings.getF32("MaxSelectDistance");
// F32 deselect_dist = gSavedSettings.getF32("MaxSelectDistance");
// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Modified: RLVa-0.2.0f
F32 deselect_dist = (!fRlvFartouch) ? gSavedSettings.getF32("MaxSelectDistance") : 1.5f;
// [/RLVa:KB]
F32 deselect_dist_sq = deselect_dist * deselect_dist;
LLVector3d select_delta = gAgent.getPositionGlobal() - selectionCenter;
@ -5793,7 +5843,10 @@ BOOL LLSelectMgr::canDoDelete() const
can_delete = true;
}
}
// [RLVa:KB] - Checked: 2010-03-23 (RLVa-1.2.0e) | Added: RLVa-1.2.0a
can_delete &= (!rlv_handler_t::isEnabled()) || (rlvCanDeleteOrReturn());
// [/RLVa:KB]
return can_delete;
}
@ -5825,7 +5878,12 @@ void LLSelectMgr::deselect()
//-----------------------------------------------------------------------------
BOOL LLSelectMgr::canDuplicate() const
{
return const_cast<LLSelectMgr*>(this)->mSelectedObjects->getFirstCopyableObject() != NULL; // HACK: casting away constness - MG
// return const_cast<LLSelectMgr*>(this)->mSelectedObjects->getFirstCopyableObject() != NULL; // HACK: casting away constness - MG
// [RLVa:KB] - Checked: 2010-03-24 (RLVa-1.2.0e) | Added: RLVa-1.2.0a
return
(const_cast<LLSelectMgr*>(this)->mSelectedObjects->getFirstCopyableObject() != NULL) &&
( (!rlv_handler_t::isEnabled()) || (rlvCanDeleteOrReturn()) );
// [/RLVa:KB]
}
//-----------------------------------------------------------------------------
// duplicate()

View File

@ -528,3 +528,15 @@ void LLSidepanelAppearance::updateScrollingPanelList()
mEditWearable->updateScrollingPanelList();
}
}
// [RLVa:KB] - Checked: 2010-09-16 (RLVa-1.2.1a) | Added: RLVa-1.2.1a
bool LLSidepanelAppearance::isOutfitEditPanelVisible() const
{
return (mOutfitEdit) && (mOutfitEdit->getVisible());
}
bool LLSidepanelAppearance::isWearableEditPanelVisible() const
{
return (mEditWearable) && (mEditWearable->getVisible());
}
// [/RLVa:KB]

View File

@ -65,6 +65,14 @@ public:
void updateScrollingPanelList();
void updateToVisibility( const LLSD& new_visibility );
// [RLVa:KB] - Checked: 2010-09-16 (RLVa-1.2.1a) | Added: RLVa-1.2.1a
bool isOutfitEditPanelVisible() const;
bool isWearableEditPanelVisible() const;
LLPanelOutfitEdit* getOutfitEditPanel() { return mOutfitEdit; }
LLPanelEditWearable* getWearableEditPanel() { return mEditWearable; }
// [/RLVa:KB]
private:
void onFilterEdit(const std::string& search_string);
void onVisibilityChange ( const LLSD& new_visibility );

View File

@ -42,7 +42,9 @@
#include "llviewercontrol.h"
#include "llviewerinventory.h"
#include "llviewerobjectlist.h"
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b)
#include "rlvhandler.h"
// [/RLVa:KB]
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLItemPropertiesObserver
@ -321,6 +323,16 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
getChildView("BtnCreator")->setEnabled(TRUE);
getChildView("LabelCreatorTitle")->setEnabled(TRUE);
getChildView("LabelCreatorName")->setEnabled(FALSE);
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Modified: RLVa-1.0.0e
// If the object creator matches the object owner we need to anonimize the creator field as well
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) &&
( ((perm.isOwned()) && (!perm.isGroupOwned()) && (perm.getOwner() == item->getCreatorUUID()) ) ||
(RlvUtil::isNearbyAgent(item->getCreatorUUID())) ) )
{
childSetEnabled("BtnCreator", FALSE);
name = RlvStrings::getAnonym(name);
}
// [/RLVa:KB]
getChild<LLUICtrl>("LabelCreatorName")->setValue(name);
}
else
@ -345,8 +357,15 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
{
LLUUID owner_id = perm.getOwner();
name = LLSLURL("agent", owner_id, "completename").getSLURLString();
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Modified: RLVa-1.0.0e
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
name = RlvStrings::getAnonym(name);
// [/RLVa:KB]
}
getChildView("BtnOwner")->setEnabled(TRUE);
// getChildView("BtnOwner")->setEnabled(TRUE);
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Added: RLVa-1.0.0e
getChildView("BtnOwner")->setEnabled(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES));
// [/RLVa:KB]
getChildView("LabelOwnerTitle")->setEnabled(TRUE);
getChildView("LabelOwnerName")->setEnabled(FALSE);
getChild<LLUICtrl>("LabelOwnerName")->setValue(name);
@ -675,6 +694,17 @@ void LLSidepanelItemInfo::onClickCreator()
if(!item) return;
if(!item->getCreatorUUID().isNull())
{
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Added: RLVa-1.2.1b
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
{
const LLPermissions& perm = item->getPermissions();
if ( ((perm.isOwned()) && (!perm.isGroupOwned()) && (perm.getOwner() == item->getCreatorUUID()) ) ||
(RlvUtil::isNearbyAgent(item->getCreatorUUID())) )
{
return;
}
}
// [/RLVa:KB]
LLAvatarActions::showProfile(item->getCreatorUUID());
}
}
@ -690,6 +720,10 @@ void LLSidepanelItemInfo::onClickOwner()
}
else
{
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Modified: RLVa-1.0.0e
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
return;
// [/RLVa:KB]
LLAvatarActions::showProfile(item->getPermissions().getOwner());
}
}

View File

@ -61,6 +61,9 @@
#include "llspinctrl.h"
#include "roles_constants.h"
#include "llgroupactions.h"
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b)
#include "rlvhandler.h"
// [/RLVa:KB]
///----------------------------------------------------------------------------
/// Class llsidepaneltaskinfo
@ -295,8 +298,9 @@ void LLSidepanelTaskInfo::refresh()
creators_identical = LLSelectMgr::getInstance()->selectGetCreator(mCreatorID,
creator_name);
getChild<LLUICtrl>("Creator Name")->setValue(creator_name);
getChildView("Creator Name")->setEnabled(TRUE);
// getChild<LLUICtrl>("Creator Name")->setValue(creator_name);
// getChildView("Creator Name")->setEnabled(TRUE);
// [RLVa:KB] - Moved further down to avoid an annoying flicker when the text is set twice in a row
// Update owner text field
getChildView("Owner:")->setEnabled(TRUE);
@ -324,8 +328,28 @@ void LLSidepanelTaskInfo::refresh()
}
}
}
// getChild<LLUICtrl>("Owner Name")->setValue(owner_name);
// getChildView("Owner Name")->setEnabled(TRUE);
// [RLVa:KB] - Moved further down to avoid an annoying flicker when the text is set twice in a row
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Added: RLVa-1.2.1b
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
{
// Only anonimize the creator if all of the selection was created by the same avie who's also the owner or they're a nearby avie
if ( (creators_identical) && ((mCreatorID == mOwnerID) || (RlvUtil::isNearbyAgent(mCreatorID))) )
creator_name = RlvStrings::getAnonym(creator_name);
// Only anonimize 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()) )
owner_name = RlvStrings::getAnonym(owner_name);
}
getChild<LLUICtrl>("Creator Name")->setValue(creator_name);
getChildView("Creator Name")->setEnabled(TRUE);
getChild<LLUICtrl>("Owner Name")->setValue(owner_name);
getChildView("Owner Name")->setEnabled(TRUE);
// [/RLVa:KB]
// update group text field
getChildView("Group:")->setEnabled(TRUE);

View File

@ -584,6 +584,32 @@ bool LLSideTray::isTabAttached(const std::string& name)
return std::find(mTabs.begin(), mTabs.end(), tab) != mTabs.end();
}
// [RLVa:KB] - Checked: 2010-09-07 (RLVa-1.2.1a) | Added: RLVa-1.2.1a
void LLSideTray::toggleTabDocked(const std::string& strTabName)
{
if (!isTabAttached(strTabName))
{
for (child_vector_iter_t itTab = mDetachedTabs.begin(); itTab != mDetachedTabs.end(); ++itTab)
{
LLSideTrayTab* pTab = *itTab;
if (strTabName == pTab->getName())
{
pTab->toggleTabDocked();
return;
}
}
}
else
{
LLSideTrayTab* pTab = getTab(strTabName);
if (pTab)
{
pTab->toggleTabDocked();
}
}
}
// [/RLVa:KB]
bool LLSideTray::hasTabs()
{
// The open/close tab doesn't count.
@ -613,6 +639,12 @@ LLPanel* LLSideTray::openChildPanel(LLSideTrayTab* tab, const std::string& panel
std::string tab_name = tab->getName();
// [RLVa:KB] - Checked: 2010-09-07 (RLVa-1.2.1a) | Modified: RLVa-1.2.1a
// NOTE: - "panel_name" is a name of a panel *inside* of the tab, not the name of the tab that's being switched to
if ( (mValidateSignal) && (!(*mValidateSignal)(tab, LLSD(tab_name))) )
return NULL;
// [/RLVa:KB]
// Select tab and expand Side Tray only when a tab is attached.
if (isTabAttached(tab_name))
{
@ -673,6 +705,11 @@ bool LLSideTray::selectTabByName(const std::string& name, bool keep_prev_visible
if (new_tab == mActiveTab)
return false;
// [RLVa:KB] - Checked: 2010-03-01 (RLVa-1.2.0a) | Modified: RLVa-1.2.0a
if ( (mValidateSignal) && (!(*mValidateSignal)(new_tab, LLSD(name))) )
return false;
// [/RLVa:KB]
//deselect old tab
if (mActiveTab)
{
@ -1263,3 +1300,9 @@ void LLSideTray::updateSidetrayVisibility()
}
}
// [RLVa:KB] - Checked: 2010-03-01 (RLVa-1.2.0a) | Added: RLVa-1.2.0a
const LLPanel* LLSideTray::getActiveTab() const
{
return mActiveTab;
}
// [/RLVa:KB]

View File

@ -128,7 +128,11 @@ public:
/*
* get currently active tab
*/
const LLSideTrayTab* getActiveTab() const { return mActiveTab; }
// const LLSideTrayTab* getActiveTab() const { return mActiveTab; }
// [RLVa:KB] - Checked: 2010-03-01 (RLVa-1.2.0a) | Added: RLVa-1.2.0a
// *sighs* LLSideTrayTab is defined in llsidetray.cpp... we can make do with an LLPanel* though
const LLPanel* getActiveTab() const;
// [/RLVa:KB]
/*
* collapse SideBar, hiding visible tab and moving tab buttons
@ -155,6 +159,13 @@ public:
}
LLPanel* getButtonsPanel() { return mButtonsPanel; }
// [RLVa:KB] - Checked: 2010-02-28 (RLVa-1.2.0a) | Added: RLVa-1.2.0a
LLButton* getButtonFromName(const std::string& strName)
{
std::map<std::string, LLButton*>::const_iterator itBtn = mTabButtons.find(strName);
return (mTabButtons.end() != itBtn) ? itBtn->second : NULL;
}
// [/RLVa:KB]
bool getCollapsed() { return mCollapsed; }
@ -186,6 +197,10 @@ public:
bool isTabAttached (const std::string& name);
// [RLVa:KB] - Checked: 2010-09-07 (RLVa-1.2.1a) | Added: RLVa-1.2.1a
void toggleTabDocked(const std::string& strTabName);
// [/RLVa:KB]
protected:
bool hasTabs ();

View File

@ -34,6 +34,9 @@
#include "llviewernetwork.h"
#include "llfiltersd2xmlrpc.h"
#include "curl/curl.h"
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d)
#include "rlvhandler.h"
// [/RLVa:KB]
const char* LLSLURL::SLURL_HTTP_SCHEME = "http";
const char* LLSLURL::SLURL_HTTPS_SCHEME = "https";
const char* LLSLURL::SLURL_SECONDLIFE_SCHEME = "secondlife";
@ -381,8 +384,13 @@ std::string LLSLURL::getSLURLString() const
S32 x = llround( (F32)mPosition[VX] );
S32 y = llround( (F32)mPosition[VY] );
S32 z = llround( (F32)mPosition[VZ] );
return LLGridManager::getInstance()->getSLURLBase(mGrid) +
LLURI::escape(mRegion) + llformat("/%d/%d/%d",x,y,z);
// return LLGridManager::getInstance()->getSLURLBase(mGrid) +
// LLURI::escape(mRegion) + llformat("/%d/%d/%d",x,y,z);
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
return LLGridManager::getInstance()->getSLURLBase(mGrid) +
( ((!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) || (!RlvUtil::isNearbyRegion(mRegion)))
? (LLURI::escape(mRegion) + llformat("/%d/%d/%d",x,y,z)) : RlvStrings::getString(RLV_STRING_HIDDEN_REGION) );
// [/RLVa:KB]
}
case APP:
{

View File

@ -186,6 +186,10 @@
#include "llavatariconctrl.h"
#include "llvoicechannel.h"
// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0a)
#include "rlvhandler.h"
// [/RLVa:KB]
#include "lllogin.h"
#include "llevents.h"
#include "llstartuplistener.h"
@ -366,6 +370,13 @@ bool idle_startup()
// Initialize stuff that doesn't need data from simulators
//
// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0a) | Modified: RLVa-0.2.1d
if ( (gSavedSettings.controlExists(RLV_SETTING_MAIN)) && (gSavedSettings.getBOOL(RLV_SETTING_MAIN)) )
{
rlv_handler_t::setEnabled(TRUE);
}
// [/RLVa:KB]
if (LLFeatureManager::getInstance()->isSafe())
{
LLNotificationsUtil::add("DisplaySetToSafe");
@ -901,6 +912,18 @@ bool idle_startup()
// their last location, or some URL "-url //sim/x/y[/z]"
// All accounts have both a home and a last location, and we don't support
// more locations than that. Choose the appropriate one. JC
// [RLVa:KB] - Checked: 2010-04-01 (RLVa-1.2.0c) | Modified: RLVa-0.2.1d
#ifndef RLV_EXTENSION_STARTLOCATION
if (rlv_handler_t::isEnabled())
#else
if ( (rlv_handler_t::isEnabled()) && (RlvSettings::getLoginLastLocation()) )
#endif // RLV_EXTENSION_STARTLOCATION
{
// Force login at the last location
LLStartUp::setStartSLURL(LLSLURL(LLSLURL::SIM_LOCATION_LAST));
}
// [/RLVa:KB]
switch (LLStartUp::getStartSLURL().getType())
{
case LLSLURL::LOCATION:
@ -1640,6 +1663,14 @@ bool idle_startup()
llinfos << "Creating Inventory Views" << llendl;
LLFloaterReg::getInstance("inventory");
// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0a) | Added: RLVa-1.1.0f
if (rlv_handler_t::isEnabled())
{
// Regularly process a select subset of retained commands during logon
gIdleCallbacks.addFunction(RlvHandler::onIdleStartup, new LLTimer());
}
// [/RLVa:KB]
LLStartUp::setStartupState( STATE_MISC );
return FALSE;
}

View File

@ -86,7 +86,6 @@
// system includes
#include <iomanip>
//
// Globals
//

View File

@ -39,6 +39,9 @@
#include "llviewerregion.h"
#include "llworldmap.h"
#include "llagentui.h"
// [RLVa:KB] - Checked: 2010-09-03 (RLVa-1.2.1b)
#include "rlvhandler.h"
// [/RLVa:KB]
//////////////////////////////////////////////////////////////////////////////
// LLTeleportHistoryItem
@ -144,8 +147,16 @@ void LLTeleportHistory::updateCurrentLocation(const LLVector3d& new_pos)
mItems.erase (mItems.begin() + mCurrentItem + 1, mItems.end());
// Append an empty item to the history and make it current.
mItems.push_back(LLTeleportHistoryItem("", LLVector3d()));
mCurrentItem++;
// mItems.push_back(LLTeleportHistoryItem("", LLVector3d()));
// mCurrentItem++;
// [RLVa:KB] - Checked: 2010-09-03 (RLVa-1.2.1b) | Added: RLVa-1.2.1b
// Only append a new item if the list is currently empty or if not @showloc=n restricted and the last entry wasn't zero'ed out
if ( (mItems.size() == 0) || ((!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) && (!mItems.back().mGlobalPos.isExactlyZero())) )
{
mItems.push_back(LLTeleportHistoryItem("", LLVector3d()));
mCurrentItem++;
}
// [RLVa:KB]
}
// Update current history item.
@ -155,11 +166,23 @@ void LLTeleportHistory::updateCurrentLocation(const LLVector3d& new_pos)
llassert(!"Invalid current teleport histiry item");
return;
}
LLVector3 new_pos_local = gAgent.getPosAgentFromGlobal(new_pos);
mItems[mCurrentItem].mFullTitle = getCurrentLocationTitle(true, new_pos_local);
mItems[mCurrentItem].mTitle = getCurrentLocationTitle(false, new_pos_local);
mItems[mCurrentItem].mGlobalPos = new_pos;
mItems[mCurrentItem].mRegionID = gAgent.getRegion()->getRegionID();
// [RLVa:KB] - Checked: 2010-09-03 (RLVa-1.2.1b) | Added: RLVa-1.2.1b
if (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
{
// [/RLVa:KB]
LLVector3 new_pos_local = gAgent.getPosAgentFromGlobal(new_pos);
mItems[mCurrentItem].mFullTitle = getCurrentLocationTitle(true, new_pos_local);
mItems[mCurrentItem].mTitle = getCurrentLocationTitle(false, new_pos_local);
mItems[mCurrentItem].mGlobalPos = new_pos;
mItems[mCurrentItem].mRegionID = gAgent.getRegion()->getRegionID();
// [RLVa:KB] - Checked: 2010-09-03 (RLVa-1.2.1b) | Added: RLVa-1.2.1b
}
else
{
mItems[mCurrentItem] = LLTeleportHistoryItem(RlvStrings::getString(RLV_STRING_HIDDEN_PARCEL), LLVector3d::zero);
}
// [/RLVa:KB]
}
dump();

View File

@ -231,6 +231,10 @@ private:
* Using this connection we get notified when a teleport fails.
*/
boost::signals2::connection mTeleportFailedConn;
// [RLVa:KB] - Checked: 2010-09-03 (RLVa-1.2.1b) | Added: RLVa-1.2.1b
friend class RlvUIEnabler;
// [/RLVa:KB]
};
#endif

View File

@ -33,6 +33,9 @@
#include "lldir.h"
#include "llteleporthistory.h"
#include "llagent.h"
// [RLVa:KB] - Checked: 2010-09-03 (RLVa-1.2.1b)
#include "rlvhandler.h"
// [/RLVa:KB]
// Max offset for two global positions to consider them as equal
const F64 MAX_GLOBAL_POS_OFFSET = 5.0f;
@ -91,6 +94,13 @@ void LLTeleportHistoryStorage::onTeleportHistoryChange()
}
const LLTeleportHistoryItem &item = th->getItems()[th->getCurrentItemIndex()];
// [RLVa:KB] - Checked: 2010-09-03 (RLVa-1.2.1b) | Added: RLVa-1.2.1b
// Make sure we don't attempt to save zero'ed out teleport history items
if (item.mGlobalPos.isExactlyZero())
{
return;
}
// [/RLVa:KB]
addItem(item.mTitle, item.mGlobalPos);
save();
@ -115,6 +125,13 @@ bool LLTeleportHistoryStorage::compareByTitleAndGlobalPos(const LLTeleportHistor
void LLTeleportHistoryStorage::addItem(const std::string title, const LLVector3d& global_pos, const LLDate& date)
{
// [RLVa:KB] - Checked: 2010-09-03 (RLVa-1.2.1b) | Added: RLVa-1.2.1b
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
{
return;
}
// [/RLVa:KB]
LLTeleportHistoryPersistentItem item(title, global_pos, date);
slurl_list_t::iterator item_iter = std::find_if(mItems.begin(), mItems.end(),

View File

@ -111,7 +111,11 @@ public:
*/
void goToItem(S32 idx);
private:
//private:
// [RLVa:KB] - Checked: 2010-09-03 (RLVa-1.2.1b) | Added: RLVa-1.2.1b
protected:
friend class RlvUIEnabler;
// [/RLVa:KB]
void onTeleportHistoryChange();
bool compareByTitleAndGlobalPos(const LLTeleportHistoryPersistentItem& a, const LLTeleportHistoryPersistentItem& b);

View File

@ -58,6 +58,9 @@
#include "llviewerwindow.h"
#include "llvoavatarself.h"
#include "llworld.h"
// [RLVa:KB] - Checked: 2010-03-04 (RLVa-1.2.0a)
#include "rlvhandler.h"
// [/RLVa:KB]
// syntactic sugar
#define callMemberFunction(object,ptrToMember) ((object).*(ptrToMember))
@ -1135,6 +1138,15 @@ void LLToolDragAndDrop::dropObject(LLViewerObject* raycast_target,
return;
}
// [RLVa:KB] - Checked: 2010-03-23 (RLVa-1.2.0e) | Modified: RLVa-1.2.0a
// Fallback in case there's a new code path that leads here (see behaviour notes)
if ( (rlv_handler_t::isEnabled()) && ((gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) || (gRlvHandler.hasBehaviour(RLV_BHVR_INTERACT))) )
{
return;
}
// [/RLVa:KB]
//llinfos << "Rezzing object" << llendl;
make_ui_sound("UISndObjectRezIn");
LLViewerInventoryItem* item;
@ -1400,6 +1412,23 @@ EAcceptance LLToolDragAndDrop::willObjectAcceptInventory(LLViewerObject* obj, LL
BOOL volume = (LL_PCODE_VOLUME == obj->getPCode());
BOOL attached = obj->isAttachment();
BOOL unrestricted = ((perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) ? TRUE : FALSE;
// [RLVa:KB] - Checked: 2010-03-31 (RLVa-1.2.0c) | Modified: RLVa-1.0.0c
if (rlv_handler_t::isEnabled())
{
const LLViewerObject* pObjRoot = obj->getRootEdit();
if (gRlvAttachmentLocks.isLockedAttachment(pObjRoot))
{
return ACCEPT_NO_LOCKED; // Disallow inventory drops on a locked attachment
}
else if ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SITTP)) )
{
if ( (isAgentAvatarValid()) && (gAgentAvatarp->isSitting()) && (gAgentAvatarp->getRoot() == pObjRoot) )
return ACCEPT_NO_LOCKED; // ... or on a linkset the avie is sitting on under @unsit=n/@sittp=n
}
}
// [/RLVa:KB]
if (attached && !unrestricted)
{
return ACCEPT_NO_LOCKED;
@ -1618,6 +1647,15 @@ EAcceptance LLToolDragAndDrop::dad3dRezAttachmentFromInv(
return ACCEPT_NO;
}
// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.2.1f
if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_ANY)) )
{
ERlvWearMask eWearMask = gRlvAttachmentLocks.canAttach(item); bool fReplace = !(mask & MASK_CONTROL);
if ( ((!fReplace) && ((RLV_WEAR_ADD & eWearMask) == 0)) || ((fReplace) && ((RLV_WEAR_REPLACE & eWearMask) == 0)) )
return ACCEPT_NO_LOCKED;
}
// [/RLVa:KB]
if (drop)
{
if (mSource == SOURCE_LIBRARY)
@ -1651,6 +1689,14 @@ EAcceptance LLToolDragAndDrop::dad3dRezAttachmentFromInv(
EAcceptance LLToolDragAndDrop::dad3dRezObjectOnLand(
LLViewerObject* obj, S32 face, MASK mask, BOOL drop)
{
// [RLVa:KB] - Checked: 2010-03-23 (RLVa-1.2.0e) | Modified: RLVa-1.1.0l
// RELEASE-RLVa: [SL-2.2.0] Make sure the code below is the only code path to LLToolDragAndDrop::dad3dRezFromObjectOnLand()
if ( (rlv_handler_t::isEnabled()) && ((gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) || (gRlvHandler.hasBehaviour(RLV_BHVR_INTERACT))) )
{
return ACCEPT_NO_LOCKED;
}
// [/RLVa:KB]
if (mSource == SOURCE_WORLD)
{
return dad3dRezFromObjectOnLand(obj, face, mask, drop);
@ -1712,6 +1758,18 @@ EAcceptance LLToolDragAndDrop::dad3dRezObjectOnLand(
EAcceptance LLToolDragAndDrop::dad3dRezObjectOnObject(
LLViewerObject* obj, S32 face, MASK mask, BOOL drop)
{
// [RLVa:KB] - Checked: 2010-03-23 (RLVa-1.2.0e) | Modified: RLVa-1.1.0l
// NOTE: if (mask & MASK_CONTROL) then it's a drop rather than a rez, so we let that pass through when @rez=n restricted
// (but not when @interact=n restricted unless the drop target is a HUD attachment)
// RELEASE-RLVa: [SL-2.2.0] Make sure the code below is the only code path to LLToolDragAndDrop::dad3dRezFromObjectOnObject()
if ( (rlv_handler_t::isEnabled()) &&
( ( (gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) && ((mask & MASK_CONTROL) == 0) ) ||
( (gRlvHandler.hasBehaviour(RLV_BHVR_INTERACT)) && (((mask & MASK_CONTROL) == 0) || (!obj->isHUDAttachment())) ) ) )
{
return ACCEPT_NO_LOCKED;
}
// [/RLVa:KB]
// handle objects coming from object inventory
if (mSource == SOURCE_WORLD)
{
@ -1915,6 +1973,15 @@ EAcceptance LLToolDragAndDrop::dad3dWearItem(
return ACCEPT_NO;
}
// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.2.1f
if ( (rlv_handler_t::isEnabled()) && (gRlvWearableLocks.hasLockedWearableType(RLV_LOCK_ANY)) )
{
ERlvWearMask eWearMask = gRlvWearableLocks.canWear(item); bool fReplace = !(mask & MASK_CONTROL);
if ( ((!fReplace) && ((RLV_WEAR_ADD & eWearMask) == 0)) || ((fReplace) && ((RLV_WEAR_REPLACE & eWearMask) == 0)) )
return ACCEPT_NO_LOCKED;
}
// [/RLVa:KB]
if (drop)
{
// TODO: investigate wearables may not be loaded at this point EXT-8231

View File

@ -39,6 +39,9 @@
#include "llviewerobject.h"
#include "llviewerwindow.h"
#include "llfloatertools.h"
// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e)
#include "rlvhandler.h"
// [/RLVa:KB]
//
// Member functions
@ -90,6 +93,15 @@ void LLToolFace::pickCallback(const LLPickInfo& pick_info)
return;
}
// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Modified: RLVa-1.1.0l
if ( (rlv_handler_t::isEnabled()) &&
( (gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) ||
((gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) && (!gRlvHandler.canTouch(hit_obj, pick_info.mObjectOffset))) ) )
{
return;
}
// [/RLVa:KB]
// ...clicked on a world object, try to pick the appropriate face
if (pick_info.mKeyMask & MASK_SHIFT)

View File

@ -57,6 +57,9 @@
#include "llviewerwindow.h"
#include "llvoavatarself.h"
#include "llworld.h"
// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e)
#include "rlvhandler.h"
// [/RLVa:KB]
const S32 SLOP_DIST_SQ = 4;
@ -158,7 +161,11 @@ void LLToolGrab::pickCallback(const LLPickInfo& pick_info)
}
// if not over object, do nothing
if (!objectp)
// if (!objectp)
// [RLVa:KB] - Checked: 2010-03-11 (RLVa-1.2.0e) | Added: RLVa-1.1.0l
// Block initiating a drag operation on an object that can't be touched
if ( (!objectp) || ((rlv_handler_t::isEnabled()) && (!gRlvHandler.canTouch(objectp, pick_info.mObjectOffset))) )
// [/RLVa:KB]
{
LLToolGrab::getInstance()->setMouseCapture(TRUE);
LLToolGrab::getInstance()->mMode = GRAB_NOOBJECT;
@ -428,6 +435,22 @@ BOOL LLToolGrab::handleHover(S32 x, S32 y, MASK mask)
return TRUE;
}
// [RLVa:KB] - Checked: 2010-03-11 (RLVa-1.2.0e) | Modified: RLVa-1.1.0l
// Block dragging an object beyond touch range when @fartouch=n restricted
if ( (rlv_handler_t::isEnabled()) && (GRAB_INACTIVE != mMode) && (GRAB_NOOBJECT != mMode) && (hasMouseCapture()) &&
(gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) && (!gRlvHandler.canTouch(mGrabPick.getObject(), mGrabPick.mObjectOffset)) )
{
if (gGrabTransientTool)
{
// Prevent the grab tool from popping up as soon as we kill the drag operation
gBasicToolset->selectTool(gGrabTransientTool);
gGrabTransientTool = NULL;
}
setMouseCapture(FALSE);
return TRUE;
}
// [/RLVa:KB]
// Do the right hover based on mode
switch( mMode )
{

View File

@ -55,7 +55,10 @@
#include "llviewerjoystick.h"
#include "llviewermenu.h"
#include "llviewerparcelmgr.h"
// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e)
#include "rlvhandler.h"
#include "rlvui.h"
// [/RLVa:KB]
// Used when app not active to avoid processing hover.
LLTool* gToolNull = NULL;
@ -80,7 +83,10 @@ LLToolMgr::LLToolMgr()
{
// Not a panel, register these callbacks globally.
LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Build.Active", boost::bind(&LLToolMgr::inEdit, this));
LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Build.Enabled", boost::bind(&LLToolMgr::canEdit, this));
// LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Build.Enabled", boost::bind(&LLToolMgr::canEdit, this));
// [RLVa:KB] - Checked: 2010-09-11 (RLVa-1.2.1d) | Added: RLVa-1.2.1d
LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Build.Enabled", boost::bind(&RlvUIEnabler::isBuildEnabled));
// [/RLVa:KB]
LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Build.Toggle", boost::bind(&LLToolMgr::toggleBuildMode, this));
gToolNull = new LLTool(LLStringUtil::null); // Does nothing
@ -291,7 +297,14 @@ void LLToolMgr::toggleBuildMode()
}
}
// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Modified: RLVa-1.0.0b
// TODO-RLVa: [RLVa-1.2.1] Does this code actually still ever trigger?
if (gRlvHandler.hasBehaviour(RLV_BHVR_EDIT))
{
LLSelectMgr::getInstance()->deselectAll();
}
// [/RLVa:KB]
setCurrentToolset(gBasicToolset);
getCurrentToolset()->selectTool( LLToolCompCreate::getInstance() );

View File

@ -69,6 +69,9 @@
#include "llui.h"
#include "llweb.h"
#include "pipeline.h" // setHighlightObject
// [RLVa:KB] - Checked: 2010-03-06 (RLVa-1.2.0c)
#include "rlvhandler.h"
// [/RLVa:KB]
extern BOOL gDebugClicks;
@ -185,6 +188,15 @@ BOOL LLToolPie::pickLeftMouseDownCallback()
// If it's a left-click, and we have a special action, do it.
if (useClickAction(mask, object, parent))
{
// [RLVa:KB] - Checked: 2010-03-11 (RLVa-1.2.0e) | Modified: RLVa-1.1.0l
// Block left-click special actions when fartouch restricted
if ( (rlv_handler_t::isEnabled()) &&
(gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) && (!gRlvHandler.canTouch(object, mPick.mObjectOffset)) )
{
return TRUE;
}
// [/RLVa:KB]
mClickAction = 0;
if (object && object->getClickAction())
{
@ -294,6 +306,14 @@ BOOL LLToolPie::pickLeftMouseDownCallback()
((object->usePhysics() || (parent && !parent->isAvatar() && parent->usePhysics())) || touchable)
)
{
// [RLVa:KB] - Checked: 2010-03-11 (RLVa-1.2.0e) | Modified: RLVa-1.1.0l
// Triggered by left-clicking on a touchable object
if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.canTouch(object, mPick.mObjectOffset)) )
{
return LLTool::handleMouseDown(x, y, mask);
}
// [/RLVa:KB]
gGrabTransientTool = this;
LLToolMgr::getInstance()->getCurrentToolset()->selectTool( LLToolGrab::getInstance() );
return LLToolGrab::getInstance()->handleObjectHit( mPick );
@ -406,7 +426,11 @@ ECursorType cursor_from_object(LLViewerObject* object)
{
case CLICK_ACTION_SIT:
{
if (isAgentAvatarValid() && !gAgentAvatarp->isSitting()) // not already sitting?
// if (isAgentAvatarValid() && !gAgentAvatarp->isSitting()) // not already sitting?
// [RLVa:KB] - Checked: 2010-03-06 (RLVa-1.2.0c) | Modified: RLVa-1.2.0g
if ( (isAgentAvatarValid() && !gAgentAvatarp->isSitting()) &&
((!rlv_handler_t::isEnabled()) || (gRlvHandler.canSit(object, LLToolPie::getInstance()->getHoverPick().mObjectOffset))) )
// [/RLVa:KB]
{
cursor = UI_CURSOR_TOOLSIT;
}
@ -501,6 +525,19 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask)
LLViewerObject *parent = NULL;
LLViewerObject *object = mHoverPick.getObject();
// [RLVa:KB] - Checked: 2010-03-11 (RLVa-1.2.0e) | Modified: RLVa-1.1.0l
// Block all special click action cursors when:
// - @fartouch=n restricted and the object is out of range
// - @interact=n restricted and the object isn't a HUD attachment
if ( (object) && (rlv_handler_t::isEnabled()) &&
( ((gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH))) && (!gRlvHandler.canTouch(object, mHoverPick.mObjectOffset)) ||
((gRlvHandler.hasBehaviour(RLV_BHVR_INTERACT)) && (!object->isHUDAttachment())) ) )
{
gViewerWindow->setCursor(UI_CURSOR_ARROW);
return TRUE;
}
// [/RLVa:KB]
if (object)
{
parent = object->getRootEdit();
@ -522,7 +559,13 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask)
gViewerWindow->setCursor(cursor);
lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolPie (inactive)" << llendl;
}
// [RLVa:KB] - Checked: 2010-03-11 (RLVa-1.2.0e) | Added: RLVa-1.1.0l
else if ( (object) && (rlv_handler_t::isEnabled()) && (!gRlvHandler.canTouch(object)) )
{
// Block showing the "grab" or "touch" cursor if we can't touch the object (@fartouch=n is handled above)
gViewerWindow->setCursor(UI_CURSOR_ARROW);
}
// [/RLVa:KB]
else if ((object && !object->isAvatar() && object->usePhysics())
|| (parent && !parent->isAvatar() && parent->usePhysics()))
{
@ -1019,22 +1062,33 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l
{
// We may select this object, so pretend it was clicked
mPick = mHoverPick;
LLInspector::Params p;
p.fillFrom(LLUICtrlFactory::instance().getDefaultParams<LLInspector>());
p.message(tooltip_msg);
p.image.name("Inspector_I");
p.click_callback(boost::bind(showObjectInspector, hover_object->getID(), mHoverPick.mObjectFace));
p.time_based_media(is_time_based_media);
p.web_based_media(is_web_based_media);
p.media_playing(is_media_playing);
p.click_playmedia_callback(boost::bind(playCurrentMedia, mHoverPick));
p.click_homepage_callback(boost::bind(VisitHomePage, mHoverPick));
p.visible_time_near(6.f);
p.visible_time_far(3.f);
p.delay_time(0.35f);
p.wrap(false);
LLToolTipMgr::instance().show(p);
// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Added: RLVa-1.2.0e
if ( (!rlv_handler_t::isEnabled()) || (gRlvHandler.canTouch(hover_object, mHoverPick.mObjectOffset)) )
{
// [/RLVa:KB]
LLInspector::Params p;
p.fillFrom(LLUICtrlFactory::instance().getDefaultParams<LLInspector>());
p.message(tooltip_msg);
p.image.name("Inspector_I");
p.click_callback(boost::bind(showObjectInspector, hover_object->getID(), mHoverPick.mObjectFace));
p.time_based_media(is_time_based_media);
p.web_based_media(is_web_based_media);
p.media_playing(is_media_playing);
p.click_playmedia_callback(boost::bind(playCurrentMedia, mHoverPick));
p.click_homepage_callback(boost::bind(VisitHomePage, mHoverPick));
p.visible_time_near(6.f);
p.visible_time_far(3.f);
p.delay_time(0.35f);
p.wrap(false);
LLToolTipMgr::instance().show(p);
// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Added: RLVa-1.2.0e
}
else
{
LLToolTipMgr::instance().show(tooltip_msg);
}
// [/RLVa:KB]
}
}
}
@ -1046,6 +1100,11 @@ BOOL LLToolPie::handleToolTip(S32 local_x, S32 local_y, MASK mask)
{
if (!LLUI::sSettingGroups["config"]->getBOOL("ShowHoverTips")) return TRUE;
if (!mHoverPick.isValid()) return TRUE;
// [RLVa:KB] - Checked: 2010-05-03 (RLVa-1.2.0g) | Modified: RLVa-1.2.0g
#ifdef RLV_EXTENSION_CMD_INTERACT
if (gRlvHandler.hasBehaviour(RLV_BHVR_INTERACT)) return TRUE;
#endif // RLV_EXTENSION_CMD_INTERACT
// [/RLVa:KB]
LLViewerObject* hover_object = mHoverPick.getObject();
@ -1557,16 +1616,29 @@ BOOL LLToolPie::pickRightMouseDownCallback()
mute_msg = LLTrans::getString("MuteAvatar");
}
if (is_other_attachment)
// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Modified: RLVa-1.1.0l
// Don't show the context menu on empty selection when fartouch restricted [see LLToolSelect::handleObjectSelection()]
if ( (!rlv_handler_t::isEnabled()) || (!LLSelectMgr::getInstance()->getSelection()->isEmpty()) ||
(!gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) )
{
gMenuAttachmentOther->getChild<LLUICtrl>("Avatar Mute")->setValue(mute_msg);
gMenuAttachmentOther->show(x, y);
// [/RLVa:KB]
if (is_other_attachment)
{
gMenuAttachmentOther->getChild<LLUICtrl>("Avatar Mute")->setValue(mute_msg);
gMenuAttachmentOther->show(x, y);
}
else
{
gMenuAvatarOther->getChild<LLUICtrl>("Avatar Mute")->setValue(mute_msg);
gMenuAvatarOther->show(x, y);
}
// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Modified: RLVa-1.1.0l
}
else
{
gMenuAvatarOther->getChild<LLUICtrl>("Avatar Mute")->setValue(mute_msg);
gMenuAvatarOther->show(x, y);
make_ui_sound("UISndInvalidOp");
}
// [/RLVa:KB]
}
else if (object->isAttachment())
{
@ -1591,10 +1663,24 @@ BOOL LLToolPie::pickRightMouseDownCallback()
mute_msg = LLTrans::getString("MuteObject2");
}
gMenuHolder->getChild<LLUICtrl>("Object Mute")->setValue(mute_msg);
gMenuObject->show(x, y);
// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.el) | Modified: RLVa-1.1.0l
// Don't show the pie menu on empty selection when fartouch/interaction restricted
// (not entirely accurate in case of Tools / Select Only XXX [see LLToolSelect::handleObjectSelection()]
if ( (!rlv_handler_t::isEnabled()) || (!LLSelectMgr::getInstance()->getSelection()->isEmpty()) ||
(!gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) )
{
// [/RLVa:KB]
gMenuHolder->getChild<LLUICtrl>("Object Mute")->setValue(mute_msg);
gMenuObject->show(x, y);
showVisualContextMenuEffect();
showVisualContextMenuEffect();
// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.el) | Modified: RLVa-1.1.0l
}
else
{
make_ui_sound("UISndInvalidOp");
}
// [/RLVa:KB]
}
}

View File

@ -60,6 +60,9 @@ public:
virtual LLTool* getOverrideTool(MASK mask);
LLPickInfo& getPick() { return mPick; }
// [RLVa:KB] - Checked: 2010-03-06 (RLVa-1.2.0c) | Added: RLVa-1.2.0a
LLPickInfo& getHoverPick() { return mHoverPick; }
// [/RLVa:KB]
U8 getClickAction() { return mClickAction; }
LLViewerObject* getClickActionObject() { return mClickActionObject; }
LLObjectSelection* getLeftClickSelection() { return (LLObjectSelection*)mLeftClickSelection; }

View File

@ -43,6 +43,9 @@
#include "llviewerwindow.h"
#include "llworld.h"
#include "llui.h"
// [RLVa:KB] - Checked: 2010-03-23 (RLVa-1.2.0a)
#include "rlvhandler.h"
// [/RLVa:KB]
//Headers added for functions moved from viewer.cpp
#include "llvograss.h"
@ -123,6 +126,14 @@ BOOL LLToolPlacer::raycastForNewObjPos( S32 x, S32 y, LLViewerObject** hit_obj,
return FALSE;
}
// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Modified: RLVa-0.2.0f
// NOTE: don't use surface_pos_global since for prims it will be the center of the prim while we need center + offset
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) && (dist_vec_squared(gAgent.getPositionGlobal(), pick.mPosGlobal) > 1.5f * 1.5f) )
{
return FALSE;
}
// [/RLVa:KB]
// Find the sim where the surface lives.
LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromPosGlobal(surface_pos_global);
if (!regionp)
@ -240,7 +251,10 @@ BOOL LLToolPlacer::addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics )
{
flags |= FLAGS_USE_PHYSICS;
}
if (create_selected)
// if (create_selected)
// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Added: RLVa-1.0.0b
if ( (create_selected) && (!gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) )
// [/RLVa:KB]
{
flags |= FLAGS_CREATE_SELECTED;
}
@ -498,6 +512,13 @@ BOOL LLToolPlacer::placeObject(S32 x, S32 y, MASK mask)
{
BOOL added = TRUE;
// [RLVa:KB] - Checked: 2010-03-23 (RLVa-1.2.0e) | Modified: RLVa-1.1.0l
if ( (rlv_handler_t::isEnabled()) && ((gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) || (gRlvHandler.hasBehaviour(RLV_BHVR_INTERACT))) )
{
return TRUE; // Callers seem to expect a "did you handle it?" so we return TRUE rather than FALSE
}
// [/RLVa:KB]
if (gSavedSettings.getBOOL("CreateToolCopySelection"))
{
added = addDuplicate(x, y);

View File

@ -45,6 +45,10 @@
#include "llviewerwindow.h"
#include "llvoavatarself.h"
#include "llworld.h"
// [RLVa:KB] - Checked: 2010-03-06 (RLVa-1.2.0c)
#include "rlvhandler.h"
#include "llfloaterreg.h"
// [/RLVa:KB]
// Globals
//extern BOOL gAllowSelectAvatar;
@ -78,6 +82,35 @@ LLObjectSelectionHandle LLToolSelect::handleObjectSelection(const LLPickInfo& pi
{
object = object->getRootEdit();
}
// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Modified: RLVa-1.1.0l
if (rlv_handler_t::isEnabled())
{
if (gRlvHandler.hasBehaviour(RLV_BHVR_EDIT))
{
if (!temp_select)
return LLSelectMgr::getInstance()->getSelection();
else if (LLToolMgr::instance().inBuildMode())
LLToolMgr::instance().toggleBuildMode();
}
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) && (object) && ((!object->isAttachment()) || (!object->permYouOwner())) &&
(dist_vec_squared(gAgent.getPositionAgent(), object->getPositionRegion()) > 1.5f * 1.5f) )
{
// NOTE: see behaviour notes for a rather lengthy explanation of why we're doing things this way
//if (dist_vec_squared(gAgent.getPositionAgent(), object->getPositionRegion() + pick.mObjectOffset) > 1.5f * 1.5f)
if (dist_vec_squared(gAgent.getPositionAgent(), pick.mIntersection) > 1.5f * 1.5f)
{
if ( (LLFloaterReg::floaterInstanceVisible("build")) && (pick.mKeyMask != MASK_SHIFT) && (pick.mKeyMask != MASK_CONTROL) )
LLSelectMgr::getInstance()->deselectAll();
return LLSelectMgr::getInstance()->getSelection();
}
else if (LLToolMgr::instance().inBuildMode())
LLToolMgr::instance().toggleBuildMode();
}
}
// [/RLVa:KB]
BOOL select_owned = gSavedSettings.getBOOL("SelectOwnedOnly");
BOOL select_movable = gSavedSettings.getBOOL("SelectMovableOnly");

View File

@ -61,6 +61,10 @@
#include "llworldmapview.h"
#include "llviewercontrol.h"
// [RLVa:KB]
#include "rlvhandler.h"
// [/RLVa:KB]
const F32 DESTINATION_REACHED_RADIUS = 3.0f;
const F32 DESTINATION_VISITED_RADIUS = 6.0f;

View File

@ -40,6 +40,9 @@
#include "llworld.h"
#include "lltoolmgr.h"
#include "llviewerjoystick.h"
// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e)
#include "rlvhandler.h"
// [/RLVa:KB]
// Linden library includes
#include "lldrawable.h"
@ -345,7 +348,10 @@ void LLViewerCamera::setPerspective(BOOL for_selection,
if (limit_select_distance)
{
// ...select distance from control
z_far = gSavedSettings.getF32("MaxSelectDistance");
// z_far = gSavedSettings.getF32("MaxSelectDistance");
// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Added: RLVa-1.2.0e
z_far = (!gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) ? gSavedSettings.getF32("MaxSelectDistance") : 1.5;
// [/RLVa:KB]
}
else
{

View File

@ -77,6 +77,9 @@
#include "llwlparammanager.h"
#include "llwaterparammanager.h"
#include "llpostprocess.h"
// [RLVa:KB] - Checked: 2010-08-22 (RLVa-1.2.1a)
#include "rlvhandler.h"
// [/RLVa:KB]
extern LLPointer<LLViewerTexture> gStartTexture;
@ -922,7 +925,11 @@ void render_hud_attachments()
glh::matrix4f current_mod = glh_get_current_modelview();
// clamp target zoom level to reasonable values
gAgentCamera.mHUDTargetZoom = llclamp(gAgentCamera.mHUDTargetZoom, 0.1f, 1.f);
// gAgentCamera.mHUDTargetZoom = llclamp(gAgentCamera.mHUDTargetZoom, 0.1f, 1.f);
// [RLVa:KB] - Checked: 2010-08-22 (RLVa-1.2.1a) | Modified: RLVa-1.0.0c
gAgentCamera.mHUDTargetZoom = llclamp(gAgentCamera.mHUDTargetZoom, (!gRlvAttachmentLocks.hasLockedHUD()) ? 0.1f : 0.85f, 1.f);
// [/RLVa:KB]
// smoothly interpolate current zoom level
gAgentCamera.mHUDCurZoom = lerp(gAgentCamera.mHUDCurZoom, gAgentCamera.mHUDTargetZoom, LLCriticalDamp::getInterpolant(0.03f));

View File

@ -121,7 +121,9 @@
#include "llsyswellwindow.h"
#include "llscriptfloater.h"
// *NOTE: Please add files in alphabetical order to keep merges easy.
// [RLVa:KB] - Checked: 2010-03-11
#include "rlvfloaters.h"
// [/RLVa:KB]
void LLViewerFloaterReg::registerFloaters()
{
@ -228,6 +230,10 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("reporter", "floater_report_abuse.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterReporter>);
LLFloaterReg::add("reset_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterResetQueue>);
LLFloaterReg::add("region_info", "floater_region_info.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterRegionInfo>);
// [RLVa:KB] - Checked: 2010-03-11 (RLVa-1.2.0e) | Added: RLVa-1.2.0a
LLFloaterReg::add("rlv_behaviours", "floater_rlv_behaviours.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<RlvFloaterBehaviours>);
LLFloaterReg::add("rlv_locks", "floater_rlv_locks.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<RlvFloaterLocks>);
// [/RLVa:KB]
LLFloaterReg::add("script_debug", "floater_script_debug.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterScriptDebug>);
LLFloaterReg::add("script_debug_output", "floater_script_debug_panel.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterScriptDebugOutput>);

View File

@ -106,6 +106,10 @@
#include "lleconomy.h"
#include "boost/unordered_map.hpp"
// [RLVa:KB] - Checked: 2010-03-09 (RLVa-1.2.0a)
#include "rlvhandler.h"
// [/RLVa:KB]
using namespace LLVOAvatarDefines;
static boost::unordered_map<std::string, LLStringExplicit> sDefaultItemLabels;
@ -1076,7 +1080,10 @@ class LLAdvancedToggleWireframe : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
gUseWireframe = !(gUseWireframe);
// gUseWireframe = !(gUseWireframe);
// [RLVa:KB] - Checked: 2010-08-22 (RLVa-1.2.1a) | Added: RLVa-1.2.1a
gUseWireframe = (!gUseWireframe) && (!gRlvAttachmentLocks.hasLockedHUD());
// [/RLVa:KB]
LLPipeline::updateRenderDeferred();
gPipeline.resetVertexBuffers();
return true;
@ -2334,6 +2341,15 @@ void handle_object_touch()
LLPickInfo pick = LLToolPie::getInstance()->getPick();
// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Modified: RLVa-1.1.0l
// NOTE: fallback code since we really shouldn't be getting an active selection if we can't touch this
if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.canTouch(object, pick.mObjectOffset)) )
{
RLV_ASSERT(false);
return;
}
// [/RLVa:KB]
LLMessageSystem *msg = gMessageSystem;
msg->newMessageFast(_PREHASH_ObjectGrab);
@ -2437,7 +2453,11 @@ bool enable_object_touch(LLUICtrl* ctrl)
void handle_object_open()
{
LLFloaterReg::showInstance("openobject");
// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Added: RLVa-1.2.0e
if (enable_object_open())
LLFloaterReg::showInstance("openobject");
// [/RLVa:KB]
// LLFloaterReg::showInstance("openobject");
}
bool enable_object_open()
@ -2664,7 +2684,10 @@ bool enable_object_edit()
}
else if (LLSelectMgr::getInstance()->selectGetAllValidAndObjectsFound())
{
enable = true;
// enable = true;
// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Added: RLVa-1.2.0e
enable = !gRlvHandler.hasBehaviour(RLV_BHVR_EDIT);
// [/RLVa:KB]
}
return enable;
@ -2697,7 +2720,10 @@ class LLSelfEnableRemoveAllAttachments : public view_listener_t
{
LLVOAvatar::attachment_map_t::iterator curiter = iter++;
LLViewerJointAttachment* attachment = curiter->second;
if (attachment->getNumObjects() > 0)
// if (attachment->getNumObjects() > 0)
// [RLVa:KB] - Checked: 2010-03-04 (RLVa-1.2.0a) | Added: RLVa-1.2.0a
if ( (attachment->getNumObjects() > 0) && ((!rlv_handler_t::isEnabled()) || (gRlvAttachmentLocks.canDetach(attachment))) )
// [/RLVa:KB]
{
new_value = true;
break;
@ -2740,7 +2766,10 @@ bool enable_object_mute()
bool is_linden =
lastname && !LLStringUtil::compareStrings(lastname->getString(), "Linden");
bool is_self = avatar->isSelf();
return !is_linden && !is_self;
// 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);
// [/RLVa:KB]
}
else
{
@ -2763,6 +2792,10 @@ class LLObjectMute : public view_listener_t
LLVOAvatar* avatar = find_avatar_from_object(object);
if (avatar)
{
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Added: RLVa-1.0.0e
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
return true;
// [/RLVa:KB]
id = avatar->getID();
LLNameValue *firstname = avatar->getNVPair("FirstName");
@ -2916,7 +2949,10 @@ void handle_avatar_freeze(const LLSD& avatar_id)
if (!fullname.empty())
{
LLSD args;
args["AVATAR_NAME"] = fullname;
// 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);
// [/RLVa:KB]
LLNotificationsUtil::add("FreezeAvatarFullname",
args,
payload,
@ -3045,7 +3081,10 @@ void handle_avatar_eject(const LLSD& avatar_id)
if (!fullname.empty())
{
LLSD args;
args["AVATAR_NAME"] = fullname;
// 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);
// [/RLVa:KB]
LLNotificationsUtil::add("EjectAvatarFullname",
args,
payload,
@ -3065,7 +3104,10 @@ void handle_avatar_eject(const LLSD& avatar_id)
if (!fullname.empty())
{
LLSD args;
args["AVATAR_NAME"] = fullname;
// 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);
// [/RLVa:KB]
LLNotificationsUtil::add("EjectAvatarFullnameNoBan",
args,
payload,
@ -3299,7 +3341,10 @@ class LLSelfStandUp : public view_listener_t
bool enable_standup_self()
{
return isAgentAvatarValid() && gAgentAvatarp->isSitting();
// [RLVa:KB] - Checked: 2010-04-01 (RLVa-1.2.0c) | Modified: RLVa-1.0.0g
return isAgentAvatarValid() && gAgentAvatarp->isSitting() && !gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT);
// [/RLVa:KB]
// return isAgentAvatarValid() && gAgentAvatarp->isSitting();
}
class LLSelfSitDown : public view_listener_t
@ -3313,7 +3358,10 @@ class LLSelfSitDown : public view_listener_t
bool enable_sitdown_self()
{
return isAgentAvatarValid() && !gAgentAvatarp->isSitting() && !gAgent.getFlying();
// [RLVa:KB] - Checked: 2010-08-28 (RLVa-1.2.1a) | Added: RLVa-1.2.1a
return isAgentAvatarValid() && !gAgentAvatarp->isSitting() && !gAgent.getFlying() && !gRlvHandler.hasBehaviour(RLV_BHVR_SIT);
// [/RLVa:KB]
// return isAgentAvatarValid() && !gAgentAvatarp->isSitting() && !gAgent.getFlying();
}
// Used from the login screen to aid in UI work on side tray
@ -3528,7 +3576,10 @@ class LLAvatarEnableAddFriend : public view_listener_t
bool handleEvent(const LLSD& userdata)
{
LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject());
bool new_value = avatar && !LLAvatarActions::isFriend(avatar->getID());
// 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));
// [/RLVa:KB]
return new_value;
}
};
@ -3562,7 +3613,10 @@ class LLEditEnableCustomizeAvatar : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
bool new_value = gAgentWearables.areWearablesLoaded();
// bool new_value = gAgentWearables.areWearablesLoaded();
// [RLVa:KB] - Checked: 2010-04-01 (RLVa-1.2.0c) | Modified: RLVa-1.0.0g
bool new_value = gAgentWearables.areWearablesLoaded() && ((!rlv_handler_t::isEnabled()) || (gRlvHandler.canStand()));
// [/RLVa:KB]
return new_value;
}
};
@ -3577,6 +3631,16 @@ class LLEnableEditShape : public view_listener_t
bool is_object_sittable()
{
// [RLVa:KB] - Checked: 2010-03-06 (RLVa-1.2.0c) | Added: RLVa-1.1.0j
// RELEASE-RLVa: [SL-2.2.0] Make sure we're examining the same object that handle_sit_or_stand() will request a sit for
if (rlv_handler_t::isEnabled())
{
const LLPickInfo& pick = LLToolPie::getInstance()->getPick();
if ( (pick.mObjectID.notNull()) && (!gRlvHandler.canSit(pick.getObject(), pick.mObjectOffset)) )
return false;
}
// [/RLVa:KB]
LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
if (object && object->getPCode() == LL_PCODE_VOLUME)
@ -3608,8 +3672,23 @@ void handle_object_sit_or_stand()
// get object selection offset
if (object && object->getPCode() == LL_PCODE_VOLUME)
// if (object && object->getPCode() == LL_PCODE_VOLUME)
// [RLVa:KB] - Checked: 2010-03-06 (RLVa-1.2.0c) | Modified: RLVa-1.2.0c
if ( (object && object->getPCode() == LL_PCODE_VOLUME) &&
((!rlv_handler_t::isEnabled()) || (gRlvHandler.canSit(object, pick.mObjectOffset))) )
// [/RLVa:KB]
{
// [RLVa:KB] - Checked: 2010-08-29 (RLVa-1.2.1c) | Added: RLVa-1.2.1c
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_STANDTP)) && (isAgentAvatarValid()) )
{
if (gAgentAvatarp->isSitting())
{
gAgent.standUp();
return;
}
gRlvHandler.setSitSource(gAgent.getPositionGlobal());
}
// [/RLVa:KB]
gMessageSystem->newMessageFast(_PREHASH_AgentRequestSit);
gMessageSystem->nextBlockFast(_PREHASH_AgentData);
@ -3639,6 +3718,11 @@ class LLLandSit : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.2.1f
if ( (rlv_handler_t::isEnabled()) && ((!gRlvHandler.canStand()) || (gRlvHandler.hasBehaviour(RLV_BHVR_SIT))) )
return true;
// [/RLVa:KB]
gAgent.standUp();
LLViewerParcelMgr::getInstance()->deselectLand();
@ -4085,6 +4169,17 @@ void handle_take_copy()
{
if (LLSelectMgr::getInstance()->getSelection()->isEmpty()) return;
// [RLVa:KB] - Checked: 2010-03-07 (RLVa-1.2.0c) | Modified: RLVa-1.2.0a
if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.canStand()) )
{
// Allow only if the avie isn't sitting on any of the selected objects
LLObjectSelectionHandle hSel = LLSelectMgr::getInstance()->getSelection();
RlvSelectIsSittingOn f(gAgentAvatarp->getRoot());
if ( (hSel.notNull()) && (hSel->getFirstRootNode(&f, TRUE) != NULL) )
return;
}
// [/RLVa:KB]
const LLUUID category_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_OBJECT);
derez_objects(DRD_ACQUIRE_TO_AGENT_INVENTORY, category_id);
}
@ -4095,7 +4190,10 @@ class LLObjectReturn : public view_listener_t
bool handleEvent(const LLSD& userdata)
{
if (LLSelectMgr::getInstance()->getSelection()->isEmpty()) return true;
// [RLVa:KB] - Checked: 2010-03-24 (RLVa-1.2.0e) | Modified: RLVa-1.0.0b
if ( (rlv_handler_t::isEnabled()) && (!rlvCanDeleteOrReturn()) ) return true;
// [/RLVa:KB]
mObjectSelection = LLSelectMgr::getInstance()->getEditSelection();
LLNotificationsUtil::add("ReturnToOwner", LLSD(), LLSD(), boost::bind(&LLObjectReturn::onReturnToOwner, this, _1, _2));
@ -4167,6 +4265,9 @@ class LLObjectEnableReturn : public view_listener_t
}
}
#endif
// [RLVa:KB] - Checked: 2010-03-24 (RLVa-1.2.0e) | Modified: RLVa-1.0.0b
new_value &= (!rlv_handler_t::isEnabled()) || (rlvCanDeleteOrReturn());
// [/RLVa:KB]
return new_value;
}
};
@ -4182,11 +4283,14 @@ void handle_take()
{
// we want to use the folder this was derezzed from if it's
// available. Otherwise, derez to the normal place.
if(LLSelectMgr::getInstance()->getSelection()->isEmpty())
// if(LLSelectMgr::getInstance()->getSelection()->isEmpty())
// [RLVa:KB] - Checked: 2010-03-24 (RLVa-1.2.0e) | Modified: RLVa-1.0.0b
if ( (LLSelectMgr::getInstance()->getSelection()->isEmpty()) || ((rlv_handler_t::isEnabled()) && (!rlvCanDeleteOrReturn())) )
// [/RLVa:KB]
{
return;
}
BOOL you_own_everything = TRUE;
BOOL locked_but_takeable_object = FALSE;
LLUUID category_id;
@ -4299,7 +4403,10 @@ bool confirm_take(const LLSD& notification, const LLSD& response)
// one item selected can be copied to inventory.
BOOL enable_take()
{
if (sitting_on_selection())
// if (sitting_on_selection())
// [RLVa:KB] - Checked: 2010-03-24 (RLVa-1.2.0e) | Modified: RLVa-1.0.0b
if ( (sitting_on_selection()) || ((rlv_handler_t::isEnabled()) && (!rlvCanDeleteOrReturn())) )
// [/RLVa:KB]
{
return FALSE;
}
@ -4799,6 +4906,16 @@ class LLToolsEnableUnlink : public view_listener_t
bool new_value = LLSelectMgr::getInstance()->selectGetAllRootsValid() &&
first_editable_object &&
!first_editable_object->isAttachment();
// [RLVa:KB] - Checked: 2010-04-01 (RLVa-1.2.0c) | Modified: RLVa-0.2.0g
if ( (new_value) && ((rlv_handler_t::isEnabled()) && (!gRlvHandler.canStand())) )
{
// Allow only if the avie isn't sitting on any of the selected objects
LLObjectSelectionHandle handleSel = LLSelectMgr::getInstance()->getSelection();
RlvSelectIsSittingOn f(gAgentAvatarp->getRoot());
if (handleSel->getFirstRootNode(&f, TRUE) != NULL)
new_value = false;
}
// [/RLVa:KB]
return new_value;
}
};
@ -4807,6 +4924,17 @@ class LLToolsUnlink : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
// [RLVa:KB] - Checked: 2010-03-07 (RLVa-1.2.0c) | Modified: RLVa-0.2.0g
if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.canStand()) )
{
// Allow only if the avie isn't sitting on any of the selected objects
LLObjectSelectionHandle hSel = LLSelectMgr::getInstance()->getSelection();
RlvSelectIsSittingOn f(gAgentAvatarp->getRoot());
if ( (hSel.notNull()) && (hSel->getFirstRootNode(&f, TRUE)) )
return true;
}
// [/RLVa:KB]
LLSelectMgr::getInstance()->sendDelink();
return true;
}
@ -4826,8 +4954,12 @@ class LLToolsReleaseKeys : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
gAgent.forceReleaseControls();
// [RLVa:KB] - Checked: 2010-04-19 (RLVa-1.2.0f) | Modified: RLVa-1.0.5a
if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_REMOVE)) )
return true;
// [/RLVa:KB]
gAgent.forceReleaseControls();
return true;
}
};
@ -4836,7 +4968,11 @@ class LLToolsEnableReleaseKeys : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
return gAgent.anyControlGrabbed();
// [RLVa:KB] - Checked: 2010-04-19 (RLVa-1.2.0f) | Modified: RLVa-1.0.5a
return (gAgent.anyControlGrabbed()) &&
( (!rlv_handler_t::isEnabled()) || (!gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_REMOVE)) );
// [/RLVa:KB]
// return gAgent.anyControlGrabbed();
}
};
@ -5112,6 +5248,16 @@ void show_debug_menus()
gMenuBarView->setItemVisible("Advanced", debug);
// gMenuBarView->setItemEnabled("Advanced", debug); // Don't disable Advanced keyboard shortcuts when hidden
// [RLVa:KB] - Checked: 2010-03-09 (RLVa-1.2.0a) | Added: RLVa-1.2.0a
// NOTE: this is supposed to execute whether RLVa is enabled or not
LLMenuGL* pAdvancedMenu = gMenuBarView->findChildMenuByName("Advanced", FALSE);
if (pAdvancedMenu)
{
pAdvancedMenu->setItemVisible("RLVa", rlv_handler_t::isEnabled());
pAdvancedMenu->setItemEnabled("RLVa", rlv_handler_t::isEnabled());
}
// [/RLVa:KB]
gMenuBarView->setItemVisible("Debug", qamode);
gMenuBarView->setItemEnabled("Debug", qamode);
@ -5274,6 +5420,11 @@ class LLWorldCreateLandmark : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Added: RLVa-1.0.0a
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
return true;
// [/RLVa:KB]
LLSideTray::getInstance()->showPanel("panel_places", LLSD().with("type", "create_landmark"));
return true;
@ -5359,7 +5510,10 @@ class LLAvatarInviteToGroup : public view_listener_t
bool handleEvent(const LLSD& userdata)
{
LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
if(avatar)
// if(avatar)
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
if ( (avatar) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) )
// [/RLVa:KB]
{
LLAvatarActions::inviteToGroup(avatar->getID());
}
@ -5372,7 +5526,10 @@ class LLAvatarAddFriend : public view_listener_t
bool handleEvent(const LLSD& userdata)
{
LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
if(avatar && !LLAvatarActions::isFriend(avatar->getID()))
// 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)) )
// [/RLVa:KB]
{
request_friendship(avatar->getID());
}
@ -5385,7 +5542,10 @@ class LLAvatarAddContact : public view_listener_t
bool handleEvent(const LLSD& userdata)
{
LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
if(avatar)
// if(avatar)
// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.0f) | Modified: RLVa-1.2.0f
if ( (avatar) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) )
// [/RLVa:KB]
{
create_inventory_callingcard(avatar->getID());
}
@ -5449,7 +5609,10 @@ bool enable_pay_avatar()
{
LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
LLVOAvatar* avatar = find_avatar_from_object(obj);
return (avatar != NULL);
// 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));
// [/RLVa:KB]
}
bool enable_pay_object()
@ -5469,7 +5632,10 @@ bool enable_pay_object()
bool enable_object_stand_up()
{
// 'Object Stand Up' menu item is enabled when agent is sitting on selection
return sitting_on_selection();
// return sitting_on_selection();
// [RLVa:KB] - Checked: 2010-07-24 (RLVa-1.2.0g) | Added: RLVa-1.2.0g
return sitting_on_selection() && ( (!rlv_handler_t::isEnabled()) || (gRlvHandler.canStand()) );
// [/RLVa:KB]
}
bool enable_object_sit(LLUICtrl* ctrl)
@ -5494,6 +5660,17 @@ bool enable_object_sit(LLUICtrl* ctrl)
gMenuHolder->childSetText(item_name, get_default_item_label(item_name));
}
}
// [RLVa:KB] - Checked: 2010-04-01 (RLVa-1.2.0c) | Modified: RLVa-1.2.0c
// RELEASE-RLVA: [SL-2.2.0] Make this match what happens in handle_object_sit_or_stand()
if (rlv_handler_t::isEnabled())
{
const LLPickInfo& pick = LLToolPie::getInstance()->getPick();
if (pick.mObjectID.notNull())
sitting_on_sel = !gRlvHandler.canSit(pick.getObject(), pick.mObjectOffset);
}
// [/RLVa:KB]
return !sitting_on_sel && is_object_sittable();
}
@ -5708,7 +5885,10 @@ class LLShowAgentProfile : public view_listener_t
}
LLVOAvatar* avatar = find_avatar_from_object(agent_id);
if (avatar)
// 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)) )
// [/RLVa:KB]
{
LLAvatarActions::showProfile(avatar->getID());
}
@ -5792,6 +5972,19 @@ private:
LLViewerJointAttachment* attachment_point = NULL;
if (index > 0)
attachment_point = get_if_there(gAgentAvatarp->mAttachmentPoints, index, (LLViewerJointAttachment*)NULL);
// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.2.1f
// RELEASE-RLVa: [SL-2.2.0] If 'index != 0' then the object will be "add attached" [see LLSelectMgr::sendAttach()]
if ( (rlv_handler_t::isEnabled()) &&
( ((!index) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_ANY))) || // Can't wear on default
((index) && ((RLV_WEAR_ADD & gRlvAttachmentLocks.canAttach(attachment_point)) == 0)) || // or non-attachable attachpt
(gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) ) ) // Attach on object == "Take"
{
setObjectSelection(NULL); // Clear the selection or it'll get stuck
return true;
}
// [/RLVa:KB]
confirmReplaceAttachment(0, attachment_point);
}
return true;
@ -5936,6 +6129,24 @@ class LLAttachmentDrop : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
// [RLVa:KB] - Checked: 2010-03-15 (RLVa-1.2.0e) | Modified: RLVa-1.0.5
if (rlv_handler_t::isEnabled())
{
if (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_REMOVE))
{
// NOTE: copy/paste of the code in enable_detach()
LLObjectSelectionHandle hSelect = LLSelectMgr::getInstance()->getSelection();
RlvSelectHasLockedAttach f;
if ( (hSelect->isAttachment()) && (hSelect->getFirstRootNode(&f, FALSE) != NULL) )
return true;
}
if (gRlvHandler.hasBehaviour(RLV_BHVR_REZ))
{
return true;
}
}
// [/RLVa:KB]
LLSD payload;
LLViewerObject *object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
@ -5960,7 +6171,10 @@ class LLAttachmentDetachFromPoint : public view_listener_t
bool handleEvent(const LLSD& user_data)
{
const LLViewerJointAttachment *attachment = get_if_there(gAgentAvatarp->mAttachmentPoints, user_data.asInteger(), (LLViewerJointAttachment*)NULL);
if (attachment->getNumObjects() > 0)
// if (attachment->getNumObjects() > 0)
// [RLVa:KB] - Checked: 2010-03-04 (RLVa-1.2.0a) | Added: RLVa-1.2.0a
if ( (attachment->getNumObjects() > 0) && ((!rlv_handler_t::isEnabled()) || (gRlvAttachmentLocks.canDetach(attachment))) )
// [/RLVa:KB]
{
gMessageSystem->newMessage("ObjectDetach");
gMessageSystem->nextBlockFast(_PREHASH_AgentData);
@ -5972,6 +6186,10 @@ class LLAttachmentDetachFromPoint : public view_listener_t
iter++)
{
LLViewerObject *attached_object = (*iter);
// [RLVa:KB] - Checked: 2010-03-04 (RLVa-1.2.0a) | Added: RLVa-1.2.0a
if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.isLockedAttachment(attached_object)) )
continue;
// [/RLVa:KB]
gMessageSystem->nextBlockFast(_PREHASH_ObjectData);
gMessageSystem->addU32Fast(_PREHASH_ObjectLocalID, attached_object->getLocalID());
}
@ -5983,6 +6201,10 @@ class LLAttachmentDetachFromPoint : public view_listener_t
static bool onEnableAttachmentLabel(LLUICtrl* ctrl, const LLSD& data)
{
// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.2.1f
// RELEASE-RLVa: [SL-2.2.0] When attaching to a specific point the object will be "add attached" [see LLSelectMgr::sendAttach()]
bool fRlvEnable = true;
// [/RLVa:KB]
std::string label;
LLMenuItemGL* menu = dynamic_cast<LLMenuItemGL*>(ctrl);
if (menu)
@ -6007,9 +6229,18 @@ static bool onEnableAttachmentLabel(LLUICtrl* ctrl, const LLSD& data)
}
}
}
// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.2.1f
if (rlv_handler_t::isEnabled())
fRlvEnable = (!gRlvAttachmentLocks.isLockedAttachmentPoint(attachment, RLV_LOCK_ADD));
// [/RLVa:KB]
menu->setLabel(label);
}
return true;
// return true;
// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0a) | Added: RLVa-1.2.0a
return fRlvEnable;
// [/RLVa:KB]
}
class LLAttachmentDetach : public view_listener_t
@ -6048,6 +6279,17 @@ class LLAttachmentDetach : public view_listener_t
return true;
}
// [RLVa:KB] - Checked: 2010-03-15 (RLVa-1.2.0a) | Modified: RLVa-1.0.5
// NOTE: copy/paste of the code in enable_detach()
if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_REMOVE)) )
{
LLObjectSelectionHandle hSelect = LLSelectMgr::getInstance()->getSelection();
RlvSelectHasLockedAttach f;
if ( (hSelect->isAttachment()) && (hSelect->getFirstRootNode(&f, FALSE) != NULL) )
return true;
}
// [/RLVa:KB]
// The sendDetach() method works on the list of selected
// objects. Thus we need to clear the list, make sure it only
// contains the object the user clicked, send the message,
@ -6133,7 +6375,10 @@ class LLAttachmentEnableDrop : public view_listener_t
}
//now check to make sure that the item is actually in the inventory before we enable dropping it
bool new_value = enable_detach() && can_build && item;
// bool new_value = enable_detach() && can_build && item;
// [RLVa:KB] - Checked: 2010-03-24 (RLVa-1.0.0b) | Modified: RLVa-1.0.0b
bool new_value = enable_detach() && can_build && item && (!gRlvHandler.hasBehaviour(RLV_BHVR_REZ));
// [/RLVa:KB]
return new_value;
}
@ -6158,6 +6403,20 @@ BOOL enable_detach(const LLSD&)
// ...if it's you, good to detach
if (avatar->getID() == gAgent.getID())
{
// [RLVa:KB] - Checked: 2010-03-15 (RLVa-1.2.0a) | Modified: RLVa-1.0.5
// NOTE: this code is reused as-is in LLAttachmentDetach::handleEvent() and LLAttachmentDrop::handleEvent()
// so any changes here should be reflected there as well
// RELEASE-RLVa: [SL-2.2.0] LLSelectMgr::sendDetach() and LLSelectMgr::sendDropAttachment() call sendListToRegions with
// SEND_ONLY_ROOTS so we only need to examine the roots which saves us time
if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_REMOVE)) )
{
LLObjectSelectionHandle hSelect = LLSelectMgr::getInstance()->getSelection();
RlvSelectHasLockedAttach f;
if ( (hSelect->isAttachment()) && (hSelect->getFirstRootNode(&f, FALSE) != NULL) )
return FALSE;
}
// [/RLVa:KB]
return TRUE;
}
@ -6177,8 +6436,33 @@ class LLAttachmentEnableDetach : public view_listener_t
};
// Used to tell if the selected object can be attached to your avatar.
BOOL object_selected_and_point_valid()
//BOOL object_selected_and_point_valid()
// [RLVa:KB] - Checked: 2010-03-16 (RLVa-1.2.0a) | Added: RLVa-1.2.0a
BOOL object_selected_and_point_valid(const LLSD& sdParam)
// [/RLVa:KB]
{
// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.2.1f
if (rlv_handler_t::isEnabled())
{
if (!isAgentAvatarValid())
return FALSE;
// RELEASE-RLVa: [SL-2.2.0] Look at the caller graph for this function on every new release
// - object_is_wearable() => dead code [sdParam == 0 => default attach point => OK!]
// - enabler set up in LLVOAvatarSelf::buildMenus() => Rezzed prim / Put On / "Attach To" [sdParam == idxAttachPt]
// - "Object.EnableWear" enable => Rezzed prim / Put On / "Wear" or "Add" [sdParam blank]
// RELEASE-RLVa: [SL-2.2.0] If 'idxAttachPt != 0' then the object will be "add attached" [see LLSelectMgr::sendAttach()]
const LLViewerJointAttachment* pAttachPt =
get_if_there(gAgentAvatarp->mAttachmentPoints, sdParam.asInteger(), (LLViewerJointAttachment*)NULL);
if ( ((!pAttachPt) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_ANY))) || // Can't wear on default attach point
((pAttachPt) && ((RLV_WEAR_ADD & gRlvAttachmentLocks.canAttach(pAttachPt)) == 0)) || // or non-attachable attach point
(gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) ) // Attach on object == "Take"
{
return FALSE;
}
}
// [/RLVa:KB]
LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection();
for (LLObjectSelection::root_iterator iter = selection->root_begin();
iter != selection->root_end(); iter++)
@ -6206,9 +6490,12 @@ BOOL object_selected_and_point_valid()
}
// [RLVa:KB] - Checked: 2010-03-16 (RLVa-1.2.0a) | Added: RLVa-1.2.0a
/*
BOOL object_is_wearable()
{
if (!object_selected_and_point_valid())
// if (!object_selected_and_point_valid())
if (!object_selected_and_point_valid(LLSD(0)))
{
return FALSE;
}
@ -6228,7 +6515,8 @@ BOOL object_is_wearable()
}
return FALSE;
}
*/
// [/RLVa:KB]
class LLAttachmentPointFilled : public view_listener_t
{
@ -6238,7 +6526,12 @@ class LLAttachmentPointFilled : public view_listener_t
LLVOAvatar::attachment_map_t::iterator found_it = gAgentAvatarp->mAttachmentPoints.find(user_data.asInteger());
if (found_it != gAgentAvatarp->mAttachmentPoints.end())
{
enable = found_it->second->getNumObjects() > 0;
// enable = found_it->second->getNumObjects() > 0;
// [RLVa:KB] - Checked: 2010-03-04 (RLVa-1.2.0a) | Added: RLVa-1.2.0a
// Enable the option if there is at least one attachment on this attachment point that can be detached
enable = (found_it->second->getNumObjects() > 0) &&
((!rlv_handler_t::isEnabled()) || (gRlvAttachmentLocks.canDetach(found_it->second)));
// [/RLVa:KB]
}
return enable;
}
@ -6249,7 +6542,10 @@ class LLAvatarSendIM : public view_listener_t
bool handleEvent(const LLSD& userdata)
{
LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
if(avatar)
// if(avatar)
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
if ( (avatar) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) )
// [/RLVa:KB]
{
LLAvatarActions::startIM(avatar->getID());
}
@ -6262,7 +6558,10 @@ class LLAvatarCall : public view_listener_t
bool handleEvent(const LLSD& userdata)
{
LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
if(avatar)
// if(avatar)
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
if ( (avatar) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) )
// [/RLVa:KB]
{
LLAvatarActions::startCall(avatar->getID());
}
@ -6270,6 +6569,13 @@ class LLAvatarCall : public view_listener_t
}
};
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Added: RLVa-1.2.1b
bool enable_avatar_call()
{
return (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (LLAvatarActions::canCall());
}
// [/RLVa:KB]
namespace
{
struct QueueObjects : public LLSelectedObjectFunctor
@ -6332,6 +6638,17 @@ class LLToolsSelectedScriptAction : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
// [RLVa:KB] - Checked: 2010-04-19 (RLVa-1.2.0f) | Modified: RLVa-1.0.5a
// We'll allow resetting the scripts of objects on a non-attachable attach point since they wouldn't be able to circumvent anything
if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_REMOVE)) )
{
LLObjectSelectionHandle hSel = LLSelectMgr::getInstance()->getSelection();
RlvSelectHasLockedAttach f;
if ( (hSel->isAttachment()) && (hSel->getFirstNode(&f) != NULL) )
return true;
}
// [/RLVa:KB]
std::string action = userdata.asString();
bool mono = false;
std::string msg, name;
@ -6432,12 +6749,30 @@ void handle_selected_texture_info(void*)
void handle_test_male(void*)
{
// [RLVa:KB] - Checked: 2010-03-19 (RLVa-1.2.0c) | Modified: RLVa-1.2.0a
// TODO-RLVa: [RLVa-1.2.1] Is there any reason to still block this?
if ( (rlv_handler_t::isEnabled()) &&
((gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_ANY)) || (gRlvWearableLocks.hasLockedWearableType(RLV_LOCK_ANY))) )
{
return;
}
// [/RLVa:KB]
LLAppearanceMgr::instance().wearOutfitByName("Male Shape & Outfit");
//gGestureList.requestResetFromServer( TRUE );
}
void handle_test_female(void*)
{
// [RLVa:KB] - Checked: 2010-03-19 (RLVa-1.2.0c) | Modified: RLVa-1.2.0a
// TODO-RLVa: [RLVa-1.2.1] Is there any reason to still block this?
if ( (rlv_handler_t::isEnabled()) &&
((gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_ANY)) || (gRlvWearableLocks.hasLockedWearableType(RLV_LOCK_ANY))) )
{
return;
}
// [/RLVa:KB]
LLAppearanceMgr::instance().wearOutfitByName("Female Shape & Outfit");
//gGestureList.requestResetFromServer( FALSE );
}
@ -6605,6 +6940,22 @@ class LLSomethingSelectedNoHUD : public view_listener_t
static bool is_editable_selected()
{
// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.0.5a
// RELEASE-RLVa: [SL-2.2.0] Check that this still isn't called by anything but script actions in the Build menu
if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_REMOVE)) )
{
LLObjectSelectionHandle hSelection = LLSelectMgr::getInstance()->getSelection();
// NOTE: this is called for 5 different menu items so we'll trade accuracy for efficiency and only
// examine root nodes (LLToolsSelectedScriptAction::handleEvent() will catch what we miss)
RlvSelectHasLockedAttach f;
if ( (hSelection->isAttachment()) && (hSelection->getFirstRootNode(&f)) )
{
return false;
}
}
// [/RLVa:KB]
return (LLSelectMgr::getInstance()->getSelection()->getFirstEditableObject() != NULL);
}
@ -6649,7 +7000,11 @@ bool enable_object_take_copy()
{
virtual bool apply(LLViewerObject* obj)
{
return (!obj->permCopy() || obj->isAttachment());
// return (!obj->permCopy() || obj->isAttachment());
// [RLVa:KB] - Checked: 2010-04-01 (RLVa-1.2.0c) | Modified: RLVa-1.0.0g
return (!obj->permCopy() || obj->isAttachment()) ||
( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) && (isAgentAvatarValid()) && (gAgentAvatarp->getRoot() == obj) );
// [/RLVa:KB]
}
} func;
const bool firstonly = true;
@ -6782,7 +7137,10 @@ class LLWorldEnableCreateLandmark : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
return !LLLandmarkActions::landmarkAlreadyExists();
// return !LLLandmarkActions::landmarkAlreadyExists();
// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Added: RLVa-1.2.1f
return (!LLLandmarkActions::landmarkAlreadyExists()) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC));
// [/RLVa:KB]
}
};
@ -6803,6 +7161,10 @@ class LLWorldEnableTeleportHome : public view_listener_t
LLViewerRegion* regionp = gAgent.getRegion();
bool agent_on_prelude = (regionp && regionp->isPrelude());
bool enable_teleport_home = gAgent.isGodlike() || !agent_on_prelude;
// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.2.1f
enable_teleport_home &=
(!rlv_handler_t::isEnabled()) || ((!gRlvHandler.hasBehaviour(RLV_BHVR_TPLM)) && (!gRlvHandler.hasBehaviour(RLV_BHVR_TPLOC)));
// [/RLVa:KB]
return enable_teleport_home;
}
};
@ -7226,6 +7588,11 @@ class LLViewHighlightTransparent : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Modified: RLVa-1.0.0b
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) && (!LLDrawPoolAlpha::sShowDebugAlpha))
return true;
// [/RLVa:KB]
LLDrawPoolAlpha::sShowDebugAlpha = !LLDrawPoolAlpha::sShowDebugAlpha;
return true;
}
@ -7412,6 +7779,11 @@ class LLViewShowHUDAttachments : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
// [RLVa:KB] - Checked: 2010-04-19 (RLVa-1.2.1a) | Modified: RLVa-1.0.0c
if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.hasLockedHUD()) && (LLPipeline::sShowHUDAttachments) )
return true;
// [/RLVa:KB]
LLPipeline::sShowHUDAttachments = !LLPipeline::sShowHUDAttachments;
return true;
}
@ -7432,8 +7804,15 @@ class LLEditEnableTakeOff : public view_listener_t
{
std::string clothing = userdata.asString();
LLWearableType::EType type = LLWearableType::typeNameToType(clothing);
if (type >= LLWearableType::WT_SHAPE && type < LLWearableType::WT_COUNT)
// if (type >= LLWearableType::WT_SHAPE && type < LLWearableType::WT_COUNT)
// [RLVa:KB] - Checked: 2010-03-20 (RLVa-1.2.0c) | Modified: RLVa-1.2.0a
// NOTE: see below - enable if there is at least one wearable on this type that can be removed
if ( (type >= LLWearableType::WT_SHAPE && type < LLWearableType::WT_COUNT) &&
((!rlv_handler_t::isEnabled()) || (gRlvWearableLocks.canRemove(type))) )
// [/RLVa:KB]
{
return LLAgentWearables::selfHasWearable(type);
}
return false;
}
};
@ -7454,6 +7833,22 @@ class LLEditTakeOff : public view_listener_t
{
// MULTI-WEARABLES: assuming user wanted to remove top shirt.
U32 wearable_index = gAgentWearables.getWearableCount(type) - 1;
// [RLVa:KB] - Checked: 2010-06-09 (RLVa-1.2.0g) | Added: RLVa-1.2.0g
if ( (rlv_handler_t::isEnabled()) && (gRlvWearableLocks.hasLockedWearable(type)) )
{
// We'll use the first wearable we come across that can be removed (moving from top to bottom)
for (; wearable_index >= 0; wearable_index--)
{
const LLWearable* pWearable = gAgentWearables.getWearable(type, wearable_index);
if (!gRlvWearableLocks.isLockedWearable(pWearable))
break;
}
if (wearable_index < 0)
return true; // No wearable found that can be removed
}
// [/RLVa:KB]
LLViewerInventoryItem *item = dynamic_cast<LLViewerInventoryItem*>(gAgentWearables.getWearableInventoryItem(type,wearable_index));
LLWearableBridge::removeItemFromAvatar(item);
}
@ -7497,6 +7892,11 @@ class LLWorldEnvSettings : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
// [RLVa:KB] - Checked: 2010-03-18 (RLVa-1.2.0a) | Modified: RLVa-1.0.0g
if (gRlvHandler.hasBehaviour(RLV_BHVR_SETENV))
return true;
// [/RLVa:KB]
std::string tod = userdata.asString();
LLVector3 sun_direction;
@ -8047,7 +8447,10 @@ void initialize_menus()
commit.add("Avatar.Eject", boost::bind(&handle_avatar_eject, LLSD()));
view_listener_t::addMenu(new LLAvatarSendIM(), "Avatar.SendIM");
view_listener_t::addMenu(new LLAvatarCall(), "Avatar.Call");
enable.add("Avatar.EnableCall", boost::bind(&LLAvatarActions::canCall));
// enable.add("Avatar.EnableCall", boost::bind(&LLAvatarActions::canCall));
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Added: RLVa-1.2.1b
enable.add("Avatar.EnableCall", boost::bind(&enable_avatar_call));
// [/RLVa:KB]
view_listener_t::addMenu(new LLAvatarReportAbuse(), "Avatar.ReportAbuse");
view_listener_t::addMenu(new LLAvatarEnableAddFriend(), "Avatar.EnableAddFriend");
@ -8075,7 +8478,10 @@ void initialize_menus()
enable.add("Object.EnableOpen", boost::bind(&enable_object_open));
enable.add("Object.EnableTouch", boost::bind(&enable_object_touch, _1));
enable.add("Object.EnableDelete", boost::bind(&enable_object_delete));
enable.add("Object.EnableWear", boost::bind(&object_selected_and_point_valid));
// enable.add("Object.EnableWear", boost::bind(&object_selected_and_point_valid));
// [RLVa:KB] - Checked: 2010-03-16 (RLVa-1.2.0a) | Added: RLVa-1.2.0a
enable.add("Object.EnableWear", boost::bind(&object_selected_and_point_valid, _2));
// [/RLVa:KB]
enable.add("Object.EnableStandUp", boost::bind(&enable_object_stand_up));
enable.add("Object.EnableSit", boost::bind(&enable_object_sit, _1));
@ -8131,4 +8537,13 @@ void initialize_menus()
view_listener_t::addMenu(new LLEditableSelectedMono(), "EditableSelectedMono");
view_listener_t::addMenu(new LLToggleUIHints(), "ToggleUIHints");
// [RLVa:KB] - Checked: 2010-04-23 (RLVa-1.2.0g) | Added: RLVa-1.2.0
commit.add("RLV.ToggleEnabled", boost::bind(&rlvMenuToggleEnabled));
enable.add("RLV.CheckEnabled", boost::bind(&rlvMenuCheckEnabled));
if (rlv_handler_t::isEnabled())
{
enable.add("RLV.EnableIfNot", boost::bind(&rlvMenuEnableIfNot, _2));
}
// [/RLVa:KB]
}

View File

@ -105,6 +105,11 @@
#include "llagentui.h"
#include "llpanelblockedlist.h"
#include "llpanelplaceprofile.h"
// [RLVa:KB] - Checked: 2010-03-09 (RLVa-1.2.0a)
#include "rlvhandler.h"
#include "rlvinventory.h"
#include "rlvui.h"
// [/RLVa:KB]
#include <boost/algorithm/string/split.hpp> //
#include <boost/regex.hpp>
@ -1392,7 +1397,14 @@ void LLOfferInfo::send_auto_receive_response(void)
if(IM_INVENTORY_OFFERED == mIM)
{
// add buddy to recent people list
LLRecentPeople::instance().add(mFromID);
// LLRecentPeople::instance().add(mFromID);
// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
// RELEASE-RLVa: [RLVa-1.2.0] Make sure this stays in sync with the condition in inventory_offer_handler()
if ((!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) || (!RlvUtil::isNearbyAgent(mFromID)) || (RlvUIEnabler::hasOpenIM(mFromID)))
{
LLRecentPeople::instance().add(mFromID);
}
// [/RLVa:KB]
}
}
@ -1463,6 +1475,21 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
// This is an offer from an agent. In this case, the back
// end has already copied the items into your inventory,
// so we can fetch it out of our inventory.
// [RLVa:KB] - Checked: 2010-04-18 (RLVa-1.2.0e) | Modified: RLVa-1.2.0e
#ifdef RLV_EXTENSION_GIVETORLV_A2A
if ( (rlv_handler_t::isEnabled()) && (!RlvSettings::getForbidGiveToRLV()) && (LLAssetType::AT_CATEGORY == mType) &&
(RlvInventory::instance().getSharedRoot()) && (mDesc.find(RLV_PUTINV_PREFIX) == 0) )
{
RlvGiveToRLVAgentOffer* pOfferObserver = new RlvGiveToRLVAgentOffer(mObjectID);
pOfferObserver->startFetch();
if (pOfferObserver->isFinished())
pOfferObserver->done();
else
gInventory.addObserver(pOfferObserver);
}
#endif // RLV_EXTENSION_GIVETORLV_A2A
// [/RLVa:KB]
LLOpenAgentOffer* open_agent_offer = new LLOpenAgentOffer(mObjectID, from_string);
open_agent_offer->startFetch();
if(catp || (itemp && itemp->isFinished()))
@ -1635,6 +1662,14 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const
std::string full_name;
if (gCacheName->getFullName(mFromID, full_name))
{
// [RLVa:KB] - Checked: 2010-04-022 (RLVa-1.2.0f) | Modified: RLVa-1.2.0f
// RELEASE-RLVa: [RLVa-1.2.0] Make sure this stays in sync with the condition in inventory_offer_handler()
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (RlvUtil::isNearbyAgent(mFromID)) &&
(!RlvUIEnabler::hasOpenIM(mFromID)) )
{
full_name = RlvStrings::getAnonym(full_name);
}
// [/RLVa:KB]
from_string = LLTrans::getString("InvOfferAnObjectNamed") + " "+ LLTrans::getString("'") + mFromName
+ LLTrans::getString("'")+" " + LLTrans::getString("InvOfferOwnedBy") + full_name;
chatHistory_string = mFromName + " " + LLTrans::getString("InvOfferOwnedBy") + " " + full_name;
@ -1654,12 +1689,40 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const
bool busy=FALSE;
// [RLVa:KB] - Checked: 2010-09-23 (RLVa-1.2.1e) | Added: RLVa-1.2.1e
bool fRlvNotifyAccepted = false;
// [/RLVa:KB]
switch(button)
{
case IOR_ACCEPT:
// ACCEPT. The math for the dialog works, because the accept
// for inventory_offered, task_inventory_offer or
// group_notice_inventory is 1 greater than the offer integer value.
// [RLVa:KB] - Checked: 2010-09-23 (RLVa-1.2.1e) | Modified: RLVa-1.2.1e
// Only change the inventory offer's destination folder to the shared root if:
// - the user has enabled the feature
// - the inventory offer came from a script (and specifies a folder)
// - the name starts with the prefix - mDesc format: '[OBJECTNAME]' ( http://slurl.com/... )
if ( (rlv_handler_t::isEnabled()) &&
(IM_TASK_INVENTORY_OFFERED == mIM) && (LLAssetType::AT_CATEGORY == mType) && (mDesc.find(RLV_PUTINV_PREFIX) == 1) )
{
fRlvNotifyAccepted = true;
if (!RlvSettings::getForbidGiveToRLV())
{
const LLViewerInventoryCategory* pRlvRoot = RlvInventory::instance().getSharedRoot();
if (pRlvRoot)
{
fRlvNotifyAccepted = false; // "accepted_in_rlv" is sent from RlvGiveToRLVTaskOffer *after* we have the folder
mFolderID = pRlvRoot->getUUID();
RlvGiveToRLVTaskOffer* pOfferObserver = new RlvGiveToRLVTaskOffer(mTransactionID);
gInventory.addObserver(pOfferObserver);
}
}
}
// [/RLVa:KB]
// Generates IM_INVENTORY_ACCEPTED, IM_TASK_INVENTORY_ACCEPTED,
// or IM_GROUP_NOTICE_INVENTORY_ACCEPTED
msg->addU8Fast(_PREHASH_Dialog, (U8)(mIM + 1));
@ -1668,6 +1731,15 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const
// send the message
msg->sendReliable(mHost);
// [RLVa:KB] - Checked: 2010-09-23 (RLVa-1.2.1e) | Added: RLVa-1.2.1e
if (fRlvNotifyAccepted)
{
std::string::size_type idxToken = mDesc.find("' ( http://");
if (std::string::npos != idxToken)
RlvBehaviourNotifyHandler::instance().sendNotification("accepted_in_inv inv_offer " + mDesc.substr(1, idxToken - 1));
}
// [/RLVa:KB]
//don't spam them if they are getting flooded
if (check_offer_throttle(mFromName, true))
{
@ -1715,12 +1787,24 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const
msg->addBinaryDataFast(_PREHASH_BinaryBucket, EMPTY_BINARY_BUCKET, EMPTY_BINARY_BUCKET_SIZE);
// send the message
msg->sendReliable(mHost);
// [RLVa:KB] - Checked: 2010-09-23 (RLVa-1.2.1e) | Added: RLVa-1.2.1e
if ( (rlv_handler_t::isEnabled()) &&
(IM_TASK_INVENTORY_OFFERED == mIM) && (LLAssetType::AT_CATEGORY == mType) && (mDesc.find(RLV_PUTINV_PREFIX) == 1) )
{
std::string::size_type idxToken = mDesc.find("' ( http://");
if (std::string::npos != idxToken)
RlvBehaviourNotifyHandler::instance().sendNotification("declined inv_offer " + mDesc.substr(1, idxToken - 1));
}
// [/RLVa:KB]
{
LLStringUtil::format_map_t log_message_args;
log_message_args["DESC"] = mDesc;
log_message_args["NAME"] = mFromName;
log_message = LLTrans::getString("InvOfferDecline", log_message_args);
}
LLSD args;
args["MESSAGE"] = log_message;
LLNotificationsUtil::add("SystemMessage", args);
@ -1861,6 +1945,15 @@ void inventory_offer_handler(LLOfferInfo* info)
// Object -> Agent Inventory Offer
if (info->mFromObject)
{
// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
// Only filter if the object owner is a nearby agent
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (RlvUtil::isNearbyAgent(info->mFromID)) )
{
payload["rlv_shownames"] = TRUE;
args["NAME"] = args["NAME_SLURL"] = RlvStrings::getAnonym(info->mFromName);
}
// [/RLVa:KB]
// Inventory Slurls don't currently work for non agent transfers, so only display the object name.
args["ITEM_SLURL"] = msg;
// Note: sets inventory_task_offer_callback as the callback
@ -1872,6 +1965,16 @@ void inventory_offer_handler(LLOfferInfo* info)
}
else // Agent -> Agent Inventory Offer
{
// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
// Only filter if the offer is from a nearby agent and if there's no open IM session (doesn't necessarily have to be focused)
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (RlvUtil::isNearbyAgent(info->mFromID)) &&
(!RlvUIEnabler::hasOpenIM(info->mFromID)) )
{
payload["rlv_shownames"] = TRUE;
args["NAME"] = args["NAME_SLURL"] = RlvStrings::getAnonym(info->mFromName);
}
// [/RLVa:KB]
p.responder = info;
// Note: sets inventory_offer_callback as the callback
// *TODO fix memory leak
@ -2256,7 +2359,18 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
// do nothing -- don't distract newbies in
// Prelude with global IMs
}
else if (offline == IM_ONLINE && !is_linden && is_busy && name != SYSTEM_FROM)
// [RLVa:KB] - Checked: 2010-03-27 (RLVa-1.2.0b) | Modified: RLVa-1.2.0b
else if ( (rlv_handler_t::isEnabled()) && (offline == IM_ONLINE) && ("@version" == message) )
{
// TODO-RLVa: [RLVa-1.2.1] Should we send our version string if the other party is muted?
RlvUtil::sendBusyMessage(from_id, RlvStrings::getVersion(), session_id);
}
// [/RLVa:KB]
// else if (offline == IM_ONLINE && !is_linden && is_busy && name != SYSTEM_FROM)
// [RLVa:KB] - Checked: 2010-03-23 (RLVa-1.2.0a) | Modified: RLVa-1.0.0g
else if ( (offline == IM_ONLINE && !is_linden && is_busy && name != SYSTEM_FROM) &&
( (!gRlvHandler.hasBehaviour(RLV_BHVR_RECVIM)) || (gRlvHandler.isException(RLV_BHVR_RECVIM, from_id))) )
// [/RLVa:KB]
{
// return a standard "busy" message, but only do it to online IM
// (i.e. not other auto responses and not store-and-forward IM)
@ -2315,6 +2429,23 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
else
{
// standard message, not from system
bool mute_im = is_muted;
if(accept_im_from_only_friend&&!is_friend)
{
mute_im = true;
}
// [RLVa:KB] - Checked: 2010-03-23 (RLVa-1.2.0e) | Modified: RLVa-1.2.0a
// Don't block offline IMs, or IMs from Lindens
if ( (rlv_handler_t::isEnabled()) && (offline != IM_OFFLINE) && (!is_linden) &&
(gRlvHandler.hasBehaviour(RLV_BHVR_RECVIM)) && (!gRlvHandler.isException(RLV_BHVR_RECVIM, from_id)) )
{
if (!mute_im)
RlvUtil::sendBusyMessage(from_id, RlvStrings::getString(RLV_STRING_BLOCKED_RECVIM_REMOTE), session_id);
message = RlvStrings::getString(RLV_STRING_BLOCKED_RECVIM);
}
// [/RLVa:KB]
std::string saved;
if(offline == IM_OFFLINE)
{
@ -2326,11 +2457,13 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
LL_INFOS("Messaging") << "process_improved_im: session_id( " << session_id << " ), from_id( " << from_id << " )" << LL_ENDL;
/*
bool mute_im = is_muted;
if(accept_im_from_only_friend&&!is_friend)
{
mute_im = true;
}
*/
if (!mute_im || is_linden)
{
gIMMgr->addMessage(
@ -2556,6 +2689,15 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
bucketp = (struct offer_agent_bucket_t*) &binary_bucket[0];
info->mType = (LLAssetType::EType) bucketp->asset_type;
info->mObjectID = bucketp->object_id;
// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e)
/*
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (gRlvHandler.isAgentNearby(from_id)) )
{
name = RlvStrings::getAnonym(name);
}
*/
// [/RLVa:KB]
}
else
{
@ -2607,6 +2749,12 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
case IM_INVENTORY_ACCEPTED:
{
args["NAME"] = LLSLURL("agent", from_id, "completename").getSLURLString();;
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f) | Modified: RLVa-1.2.0f
// Only filter the name if the agent is nearby, there isn't an open IM session to them and their profile isn't open
// bool fRlvFilterName = (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (RlvUtil::isNearbyAgent(from_id)) &&
// (!RlvUIEnabler::hasOpenProfile(from_id)) && (!RlvUIEnabler::hasOpenIM(from_id));
// args["NAME"] = (!fRlvFilterName) ? name : RlvStrings::getAnonym(name);
// [/RLVa:KB]
LLSD payload;
payload["from_id"] = from_id;
LLNotificationsUtil::add("InventoryAccepted", args, payload);
@ -2615,6 +2763,12 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
case IM_INVENTORY_DECLINED:
{
args["NAME"] = LLSLURL("agent", from_id, "completename").getSLURLString();;
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f) | Modified: RLVa-1.2.0f
// Only filter the name if the agent is nearby, there isn't an open IM session to them and their profile isn't open
// bool fRlvFilterName = (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (RlvUtil::isNearbyAgent(from_id)) &&
// (!RlvUIEnabler::hasOpenProfile(from_id)) && (!RlvUIEnabler::hasOpenIM(from_id));
// args["NAME"] = (!fRlvFilterName) ? name : RlvStrings::getAnonym(name);
// [/RLVa:KB]
LLSD payload;
payload["from_id"] = from_id;
LLNotificationsUtil::add("InventoryDeclined", args, payload);
@ -2642,10 +2796,37 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
// Only show messages if we have a session open (which
// should happen after you get an "invitation"
/*
if ( !gIMMgr->hasSession(session_id) )
{
return;
}
*/
// [RLVa:KB] - Checked: 2010-03-23 (RLVa-1.2.0e) | Modified: RLVa-1.2.0a
LLIMModel::LLIMSession* pIMSession = LLIMModel::instance().findIMSession(session_id);
if (!pIMSession)
{
return;
}
if (gRlvHandler.hasBehaviour(RLV_BHVR_RECVIM))
{
switch (pIMSession->mSessionType)
{
case LLIMModel::LLIMSession::GROUP_SESSION: // Group chat: allow if group is a sendim exception
if ( (from_id != gAgent.getID()) && (!gRlvHandler.isException(RLV_BHVR_RECVIM, session_id)) )
return;
break;
case LLIMModel::LLIMSession::ADHOC_SESSION: // Conference chat: allow if the sender is a sendim exception
if ( (from_id != gAgent.getID()) && (!gRlvHandler.isException(RLV_BHVR_RECVIM, from_id)) )
message = RlvStrings::getString(RLV_STRING_BLOCKED_RECVIM);
break;
default:
RLV_ASSERT(false);
return;
}
}
// [/RLVa:KB]
// standard message, not from system
std::string saved;
@ -2711,6 +2892,30 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
LLSD query_string;
query_string["owner"] = from_id;
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
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)) )
{
std::string strOwnerName;
if (gCacheName->getFullName(from_id, strOwnerName))
{
query_string["owner"] = LLUUID::null;
query_string["owner_name"] = RlvStrings::getAnonym(strOwnerName);
}
RlvUtil::filterNames(name);
chat.mFromName = name;
}
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
{
std::string::size_type idxPos = location.find('/');
if ( (std::string::npos != idxPos) && (RlvUtil::isNearbyRegion(location.substr(0, idxPos))) )
location = RlvStrings::getString(RLV_STRING_HIDDEN_REGION);
}
}
// [/RLVa:KB]
query_string["slurl"] = location;
query_string["name"] = name;
if (from_group)
@ -2811,6 +3016,26 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
region_access_icn = LLViewerRegion::getAccessIcon(region_access);
}
// [RLVa:KB] - Checked: 2010-04-01 (RLVa-1.2.0c) | Modified: RLVa-1.0.0d
if (rlv_handler_t::isEnabled())
{
// Block if: 1) @tplure=n restricted (and sender isn't an exception), or 2) @unsit=n restricted and currently sitting
if ( ( (gRlvHandler.hasBehaviour(RLV_BHVR_TPLURE)) && (!gRlvHandler.isException(RLV_BHVR_TPLURE, from_id)) ) ||
( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) && (isAgentAvatarValid()) && (gAgentAvatarp->isSitting()) ) )
{
RlvUtil::sendBusyMessage(from_id, RlvStrings::getString(RLV_STRING_BLOCKED_TPLURE_REMOTE));
return;
}
// Censor lure message if: 1) @revcim=n restricted (and sender isn't an exception), or 2) @showloc=n restricted
if ( ( (gRlvHandler.hasBehaviour(RLV_BHVR_RECVIM)) && (!gRlvHandler.isException(RLV_BHVR_RECVIM, from_id)) ) ||
(gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) )
{
message = RlvStrings::getString(RLV_STRING_HIDDEN);
}
}
// [/RLVa:KB]
LLSD args;
// *TODO: Translate -> [FIRST] [LAST] (maybe)
args["NAME_SLURL"] = LLSLURL("agent", from_id, "about").getSLURLString();
@ -2822,10 +3047,23 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
payload["lure_id"] = session_id;
payload["godlike"] = FALSE;
LLNotification::Params params("TeleportOffered");
params.substitutions = args;
params.payload = payload;
LLPostponedNotification::add<LLPostponedOfferNotification>( params, from_id, false);
LLNotification::Params params("TeleportOffered");
params.substitutions = args;
params.payload = payload;
// [RLVa:KB] - Checked: 2010-04-07 (RLVa-1.2.0d) | Modified: RLVa-0.2.0b
if ( (rlv_handler_t::isEnabled()) &&
((gRlvHandler.hasBehaviour(RLV_BHVR_ACCEPTTP)) || (gRlvHandler.isException(RLV_BHVR_ACCEPTTP, from_id))) )
{
gRlvHandler.setCanCancelTp(false);
LLNotifications::instance().forceResponse(LLNotification::Params("TeleportOffered").payload(payload), 0);
}
else
{
LLPostponedNotification::add<LLPostponedOfferNotification>( params, from_id, false);
}
// [/RLVa:KB]
// LLPostponedNotification::add<LLPostponedOfferNotification>( params, from_id, false);
}
}
break;
@ -3177,9 +3415,14 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
chat.mPosAgent = chatter->getPositionAgent();
// Make swirly things only for talking objects. (not script debug messages, though)
if (chat.mSourceType == CHAT_SOURCE_OBJECT
&& chat.mChatType != CHAT_TYPE_DEBUG_MSG
&& gSavedSettings.getBOOL("EffectScriptChatParticles") )
// if (chat.mSourceType == CHAT_SOURCE_OBJECT
// && chat.mChatType != CHAT_TYPE_DEBUG_MSG
// && gSavedSettings.getBOOL("EffectScriptChatParticles") )
// [RLVa:KB] - Checked: 2010-03-09 (RLVa-1.2.0b) | Modified: RLVa-1.0.0g
if ( ((chat.mSourceType == CHAT_SOURCE_OBJECT) && (chat.mChatType != CHAT_TYPE_DEBUG_MSG)) &&
(gSavedSettings.getBOOL("EffectScriptChatParticles")) &&
((!rlv_handler_t::isEnabled()) || (CHAT_TYPE_OWNER != chat.mChatType)) )
// [/RLVa:KB]
{
LLPointer<LLViewerPartSourceChat> psc = new LLViewerPartSourceChat(chatter->getPositionAgent());
psc->setSourceObject(chatter);
@ -3212,6 +3455,75 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
color.setVec(1.f,1.f,1.f,1.f);
msg->getStringFast(_PREHASH_ChatData, _PREHASH_Message, mesg);
// [RLVa:KB] - Checked: 2010-04-23 (RLVa-1.2.0f) | Modified: RLVa-1.2.0f
if ( (rlv_handler_t::isEnabled()) && (CHAT_TYPE_START != chat.mChatType) && (CHAT_TYPE_STOP != chat.mChatType) )
{
// NOTE: chatter can be NULL (may not have rezzed yet, or could be another avie's HUD attachment)
BOOL is_attachment = (chatter) ? chatter->isAttachment() : FALSE;
// Filtering "rules":
// avatar => filter all avie text (unless it's this avie or they're an exemption)
// objects => filter everything except attachments this avie owns (never filter llOwnerSay chat)
if ( ( (CHAT_SOURCE_AGENT == chat.mSourceType) && (from_id != gAgent.getID()) ) ||
( (CHAT_SOURCE_OBJECT == chat.mSourceType) && ((!is_owned_by_me) || (!is_attachment)) &&
(CHAT_TYPE_OWNER != chat.mChatType) ) )
{
if (!RlvUtil::isEmote(mesg))
{
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_RECVCHAT)) && (!gRlvHandler.isException(RLV_BHVR_RECVCHAT, from_id)) )
gRlvHandler.filterChat(mesg, false);
}
else if ( (gRlvHandler.hasBehaviour(RLV_BHVR_RECVEMOTE)) && (!gRlvHandler.isException(RLV_BHVR_RECVEMOTE, from_id)) )
{
mesg = "/me ...";
}
}
// Filtering "rules":
// avatar => filter only their name (unless it's this avie)
// other => filter everything except attachments this avie owns but then we still do filter their text
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) &&
((CHAT_SOURCE_AGENT != chat.mSourceType) || (chat.mFromID != gAgent.getID())) )
{
if (CHAT_SOURCE_AGENT == chat.mSourceType)
{
chat.mFromName = RlvStrings::getAnonym(from_name);
chat.mRlvNamesFiltered = TRUE;
}
else if ( (!is_owned_by_me) || (!is_attachment) )
{
RlvUtil::filterNames(chat.mFromName);
}
}
// Create an "objectim" URL for objects if we're either @shownames or @showloc restricted
// (we need to do this now because we won't be have enough information to do it later on)
if ( (CHAT_SOURCE_OBJECT == chat.mSourceType) &&
((gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))) )
{
LLSD sdQuery; std::string strOwnerName, strQuery;
sdQuery["name"] = chat.mFromName;
sdQuery["owner"] = owner_id;
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) &&
(!is_owned_by_me) && (gCacheName->getFullName(owner_id, strOwnerName)) )
{
sdQuery["owner"] = LLUUID::null;
sdQuery["owner_name"] = RlvStrings::getAnonym(strOwnerName);
}
const LLViewerRegion* pRegion = LLWorld::getInstance()->getRegionFromPosAgent(chat.mPosAgent);
if (pRegion)
{
sdQuery["slurl"] = LLSLURL(pRegion->getName(), LLVector3d(chat.mPosAgent)).getSLURLString();
}
strQuery = LLURI::mapToQueryString(sdQuery);
chat.mURL = LLSLURL("objectim", from_id, strQuery).getSLURLString();
}
}
// [/RLVa:KB]
BOOL ircstyle = FALSE;
// Look for IRC-style emotes here so chatbubbles work
@ -3261,8 +3573,99 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
case CHAT_TYPE_WHISPER:
verb = LLTrans::getString("whisper") + " ";
break;
case CHAT_TYPE_DEBUG_MSG:
case CHAT_TYPE_OWNER:
// [RLVa:KB] - Checked: 2010-02-XX (RLVa-1.2.0a) | Modified: RLVa-1.1.0f
// TODO-RLVa: [RLVa-1.2.0] consider rewriting this before a RLVa-1.2.0 release
if ( (rlv_handler_t::isEnabled()) && (mesg.length() > 3) && (RLV_CMD_PREFIX == mesg[0]) && (CHAT_TYPE_OWNER == chat.mChatType) )
{
mesg.erase(0, 1);
LLStringUtil::toLower(mesg);
std::string strExecuted, strFailed, strRetained, *pstr;
boost_tokenizer tokens(mesg, boost::char_separator<char>(",", "", boost::drop_empty_tokens));
for (boost_tokenizer::iterator itToken = tokens.begin(); itToken != tokens.end(); ++itToken)
{
std::string strCmd = *itToken;
ERlvCmdRet eRet = gRlvHandler.processCommand(from_id, strCmd, true);
if ( (RlvSettings::getDebug()) &&
( (!RlvSettings::getDebugHideUnsetDup()) ||
((RLV_RET_SUCCESS_UNSET != eRet) && (RLV_RET_SUCCESS_DUPLICATE != eRet)) ) )
{
if ( RLV_RET_SUCCESS == (eRet & RLV_RET_SUCCESS) )
pstr = &strExecuted;
else if ( RLV_RET_FAILED == (eRet & RLV_RET_FAILED) )
pstr = &strFailed;
else if (RLV_RET_RETAINED == eRet)
pstr = &strRetained;
else
{
RLV_ASSERT(false);
pstr = &strFailed;
}
const char* pstrSuffix = RlvStrings::getStringFromReturnCode(eRet);
if (pstrSuffix)
strCmd.append(" (").append(pstrSuffix).append(")");
if (!pstr->empty())
pstr->push_back(',');
pstr->append(strCmd);
}
}
if (RlvForceWear::instanceExists())
RlvForceWear::instance().done();
if ( (!RlvSettings::getDebug()) || ((strExecuted.empty()) && (strFailed.empty()) && (strRetained.empty())) )
return;
// Silly people want comprehensive debug messages, blah :p
if ( (!strExecuted.empty()) && (strFailed.empty()) && (strRetained.empty()) )
{
verb = " executes: @";
mesg = strExecuted;
}
else if ( (strExecuted.empty()) && (!strFailed.empty()) && (strRetained.empty()) )
{
verb = " failed: @";
mesg = strFailed;
}
else if ( (strExecuted.empty()) && (strFailed.empty()) && (!strRetained.empty()) )
{
verb = " retained: @";
mesg = strRetained;
}
else
{
verb = ": @";
if (!strExecuted.empty())
mesg += "\n - executed: @" + strExecuted;
if (!strFailed.empty())
mesg += "\n - failed: @" + strFailed;
if (!strRetained.empty())
mesg += "\n - retained: @" + strRetained;
}
break;
}
// [/RLVa:KB]
// [RLVa:KB] - Checked: 2010-03-09 (RLVa-1.2.0b) | Modified: RLVa-1.0.0g
// Copy/paste from above
if ( (rlv_handler_t::isEnabled()) && (chatter) && (chat.mSourceType == CHAT_SOURCE_OBJECT) &&
(gSavedSettings.getBOOL("EffectScriptChatParticles")) )
{
LLPointer<LLViewerPartSourceChat> psc = new LLViewerPartSourceChat(chatter->getPositionAgent());
psc->setSourceObject(chatter);
psc->setColor(color);
//We set the particles to be owned by the object's owner,
//just in case they should be muted by the mute list
psc->setOwnerUUID(owner_id);
LLViewerPartSim::getInstance()->addPartSource(psc);
}
// [/RLVa:KB]
case CHAT_TYPE_DEBUG_MSG:
case CHAT_TYPE_NORMAL:
verb = "";
break;
@ -3360,7 +3763,10 @@ void process_teleport_start(LLMessageSystem *msg, void**)
LL_DEBUGS("Messaging") << "Got TeleportStart with TeleportFlags=" << teleport_flags << ". gTeleportDisplay: " << gTeleportDisplay << ", gAgent.mTeleportState: " << gAgent.getTeleportState() << LL_ENDL;
if (teleport_flags & TELEPORT_FLAGS_DISABLE_CANCEL)
// if (teleport_flags & TELEPORT_FLAGS_DISABLE_CANCEL)
// [RLVa:KB] - Checked: 2010-04-07 (RLVa-1.2.0d) | Added: RLVa-0.2.0b
if ( (teleport_flags & TELEPORT_FLAGS_DISABLE_CANCEL) || (!gRlvHandler.getCanCancelTp()) )
// [/RLVa:KB]
{
gViewerWindow->setProgressCancelButtonVisible(FALSE);
}
@ -3396,7 +3802,10 @@ void process_teleport_progress(LLMessageSystem* msg, void**)
}
U32 teleport_flags = 0x0;
msg->getU32("Info", "TeleportFlags", teleport_flags);
if (teleport_flags & TELEPORT_FLAGS_DISABLE_CANCEL)
// if (teleport_flags & TELEPORT_FLAGS_DISABLE_CANCEL)
// [RLVa:KB] - Checked: 2010-04-07 (RLVa-1.2.0d) | Added: RLVa-0.2.0b
if ( (teleport_flags & TELEPORT_FLAGS_DISABLE_CANCEL) || (!gRlvHandler.getCanCancelTp()) )
// [/RLVa:KB]
{
gViewerWindow->setProgressCancelButtonVisible(FALSE);
}
@ -5706,7 +6115,7 @@ void notify_cautioned_script_question(const LLSD& notification, const LLSD& resp
if (viewregion)
{
// got the region, so include the region and 3d coordinates of the object
notice.setArg("[REGIONNAME]", viewregion->getName());
notice.setArg("[REGIONNAME]", viewregion->getName());
std::string formatpos = llformat("%.1f, %.1f,%.1f", objpos[VX], objpos[VY], objpos[VZ]);
notice.setArg("[REGIONPOS]", formatpos);
@ -5714,7 +6123,15 @@ void notify_cautioned_script_question(const LLSD& notification, const LLSD& resp
}
}
if (!foundpos)
// [RLVa:KB] - Checked: 2010-04-23 (RLVa-1.2.0g) | Modified: RLVa-1.0.0a
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
{
notice.setArg("[REGIONNAME]", RlvStrings::getString(RLV_STRING_HIDDEN_REGION));
notice.setArg("[REGIONPOS]", RlvStrings::getString(RLV_STRING_HIDDEN));
}
else if (!foundpos)
// [/RLVa:KB]
// if (!foundpos)
{
// unable to determine location of the object
notice.setArg("[REGIONNAME]", "(unknown region)");
@ -5919,8 +6336,32 @@ void process_script_question(LLMessageSystem *msg, void **user_data)
payload["object_name"] = object_name;
payload["owner_name"] = owner_name;
// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.0e
S32 rlvQuestionsOther = questions;
if (gRlvHandler.hasBehaviour(RLV_BHVR_ACCEPTPERMISSION))
{
const LLViewerObject* pObj = gObjectList.findObject(taskid);
if (pObj)
{
// if (pObj->permYouOwner())
// {
// PERMISSION_TAKE_CONTROLS and PERMISSION_ATTACH are only auto-granted to objects this avie owns
rlvQuestionsOther &= ~(LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_TAKE_CONTROLS] |
LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_ATTACH]);
// }
}
}
if ( (!caution) && (!rlvQuestionsOther) )
{
LLNotifications::instance().forceResponse(
LLNotification::Params("ScriptQuestion").substitutions(args).payload(payload), 0/*YES*/);
}
else if (gSavedSettings.getBOOL("PermissionsCautionEnabled"))
// [/RLVa:KB]
// check whether cautions are even enabled or not
if (gSavedSettings.getBOOL("PermissionsCautionEnabled"))
// if (gSavedSettings.getBOOL("PermissionsCautionEnabled"))
{
// display the caution permissions prompt
LLNotificationsUtil::add(caution ? "ScriptQuestionCaution" : "ScriptQuestion", args, payload);
@ -6281,6 +6722,22 @@ bool handle_lure_callback(const LLSD& notification, const LLSD& response)
if(0 == option)
{
// [RLVa:KB] - Checked: 2010-04-09 (RLVa-1.2.0e) | Modified: RLVa-0.2.0b
if (gRlvHandler.hasBehaviour(RLV_BHVR_SENDIM))
{
// Filter the teleport offer text unless everyone is a sendim exception
for (LLSD::array_const_iterator it = notification["payload"]["ids"].beginArray();
it != notification["payload"]["ids"].endArray(); ++it)
{
if (!gRlvHandler.isException(RLV_BHVR_SENDIM, it->asUUID()))
{
text = RlvStrings::getString(RLV_STRING_HIDDEN);
break;
}
}
}
// [/RLVa:KB]
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_StartLure);
msg->nextBlockFast(_PREHASH_AgentData);
@ -6334,13 +6791,29 @@ void handle_lure(const uuid_vec_t& ids)
if (!gAgent.getRegion()) return;
LLSD edit_args;
edit_args["REGION"] = gAgent.getRegion()->getName();
// [RLVa:KB] - Checked: 2010-04-07 (RLVa-1.2.0d) | Modified: RLVa-1.0.0a
edit_args["REGION"] =
(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ? gAgent.getRegion()->getName() : RlvStrings::getString(RLV_STRING_HIDDEN);
// [/RLVa:KB]
// edit_args["REGION"] = gAgent.getRegion()->getName();
LLSD payload;
for (LLDynamicArray<LLUUID>::const_iterator it = ids.begin();
it != ids.end();
++it)
{
// [RLVa:KB] - Checked: 2010-04-07 (RLVa-1.2.0d) | Modified: RLVa-1.0.0a
// Only allow offering teleports if everyone is a @tplure exception or able to map this avie under @showloc=n
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
{
const LLRelationship* pBuddyInfo = LLAvatarTracker::instance().getBuddyInfo(*it);
if ( (!gRlvHandler.isException(RLV_BHVR_TPLURE, *it, RLV_CHECK_PERMISSIVE)) &&
((!pBuddyInfo) || (!pBuddyInfo->isOnline()) || (!pBuddyInfo->isRightGrantedTo(LLRelationship::GRANT_MAP_LOCATION))) )
{
return;
}
}
// [/RLVa:KB]
payload["ids"].append(*it);
}
if (gAgent.isGodlike())

View File

@ -100,6 +100,9 @@
#include "lltrans.h"
#include "llsdutil.h"
#include "llmediaentry.h"
// [RLVa:KB] - Checked: 2010-03-27 (RLVa-1.2.0b)
#include "rlvhandler.h"
// [/RLVa:KB]
//#define DEBUG_UPDATE_TYPE
@ -1096,6 +1099,12 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
coloru.mV[3] = 255 - coloru.mV[3];
mText->setColor(LLColor4(coloru));
mText->setString(temp_string);
// [RLVa:KB] - Checked: 2010-03-27 (RLVa-1.2.0b) | Added: RLVa-1.0.0f
if (rlv_handler_t::isEnabled())
{
mText->setObjectText(temp_string);
}
// [/RLVa:KB]
if (mDrawable.notNull())
{
@ -1488,6 +1497,12 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
coloru.mV[3] = 255 - coloru.mV[3];
mText->setColor(LLColor4(coloru));
mText->setString(temp_string);
// [RLVa:KB] - Checked: 2010-03-27 (RLVa-1.2.0b) | Added: RLVa-1.0.0f
if (rlv_handler_t::isEnabled())
{
mText->setObjectText(temp_string);
}
// [/RLVa:KB]
setChanged(TEXTURE);
}
@ -1658,6 +1673,25 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
gObjectList.killObject(this);
return retval;
}
// [RLVa:KB] - Checked: 2010-03-16 (RLVa-1.1.0k) | Added: RLVa-1.1.0k
if ( (rlv_handler_t::isEnabled()) && (sent_parentp->isAvatar()) && (sent_parentp->getID() == gAgent.getID()) )
{
// Rezzed object that's being worn as an attachment (we're assuming this will be due to llAttachToAvatar())
S32 idxAttachPt = ATTACHMENT_ID_FROM_STATE(getState());
if (gRlvAttachmentLocks.isLockedAttachmentPoint(idxAttachPt, RLV_LOCK_ADD))
{
// If this will end up on an "add locked" attachment point then treat the attach as a user action
LLNameValue* nvItem = getNVPair("AttachItemID");
if (nvItem)
{
LLUUID idItem(nvItem->getString());
// URGENT-RLVa: [RLVa-1.2.0] At the moment llAttachToAvatar always seems to *add*
if (idItem.notNull())
RlvAttachmentLockWatchdog::instance().onWearAttachment(idItem, RLV_WEAR_ADD);
}
}
}
// [/RLVa:KB]
sent_parentp->addChild(this);
// make sure this object gets a non-damped update
if (sent_parentp->mDrawable.notNull())
@ -4907,7 +4941,10 @@ BOOL LLViewerObject::permTransfer() const
// given you modify rights to. JC
BOOL LLViewerObject::allowOpen() const
{
return !flagInventoryEmpty() && (permYouOwner() || permModify());
// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Modified: RLVa-1.0.0b
return !flagInventoryEmpty() && (permYouOwner() || permModify()) && (!gRlvHandler.hasBehaviour(RLV_BHVR_EDIT));
// [/RLVa:KB]
// return !flagInventoryEmpty() && (permYouOwner() || permModify());
}
LLViewerObject::LLInventoryCallbackInfo::~LLInventoryCallbackInfo()

View File

@ -328,7 +328,10 @@ public:
void sendShapeUpdate();
U8 getState() { return mState; }
// U8 getState() { return mState; }
// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0a) | Added: RLVa-1.2.0a
U8 getState() const { return mState; }
// [/RLVa:KB]
F32 getAppAngle() const { return mAppAngle; }
F32 getPixelArea() const { return mPixelArea; }

View File

@ -200,6 +200,10 @@
#include "llviewerwindowlistener.h"
#include "llpaneltopinfobar.h"
// [RLVa:KB] - Checked: 2010-03-31 (RLVa-1.2.0c)
#include "rlvhandler.h"
// [/RLVa:KB]
#if LL_WINDOWS
#include <tchar.h> // For Unicode conversion methods
#endif
@ -3214,6 +3218,15 @@ void LLViewerWindow::renderSelections( BOOL for_gl_pick, BOOL pick_parcel_walls,
{
moveable_object_selected = TRUE;
this_object_movable = TRUE;
// [RLVa:KB] - Checked: 2010-03-31 (RLVa-1.2.0c) | Modified: RLVa-0.2.0g
if ( (rlv_handler_t::isEnabled()) &&
((gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SITTP))) )
{
if ((isAgentAvatarValid()) && (gAgentAvatarp->isSitting()) && (gAgentAvatarp->getRoot() == object->getRootEdit()))
moveable_object_selected = this_object_movable = FALSE;
}
// [/RLVa:KB]
}
all_selected_objects_move = all_selected_objects_move && this_object_movable;
all_selected_objects_modify = all_selected_objects_modify && object->permModify();
@ -3481,17 +3494,42 @@ LLViewerObject* LLViewerWindow::cursorIntersect(S32 mouse_x, S32 mouse_y, F32 de
}
else // check ALL objects
{
{
found = gPipeline.lineSegmentIntersectInHUD(mouse_hud_start, mouse_hud_end, pick_transparent,
face_hit, intersection, uv, normal, binormal);
if (!found) // if not found in HUD, look in world:
// [RLVa:KB] - Checked: 2010-03-31 (RLVa-1.2.0c) | Modified: RLVa-1.2.0c
if ( (rlv_handler_t::isEnabled()) && (found) &&
(LLToolCamera::getInstance()->hasMouseCapture()) && (gKeyboard->currentMask(TRUE) & MASK_ALT) )
{
found = NULL;
}
// [/RLVa:KB]
{
if (!found) // if not found in HUD, look in world:
{
found = gPipeline.lineSegmentIntersectInWorld(mouse_world_start, mouse_world_end, pick_transparent,
face_hit, intersection, uv, normal, binormal);
}
// [RLVa:KB] - Checked: 2010-01-02 (RLVa-1.1.0l) | Added: RLVa-1.1.0l
#ifdef RLV_EXTENSION_CMD_INTERACT
if ( (rlv_handler_t::isEnabled()) && (found) && (gRlvHandler.hasBehaviour(RLV_BHVR_INTERACT)) )
{
// Allow picking if:
// - the drag-and-drop tool is active (allows inventory offers)
// - the camera tool is active
// - the pie tool is active *and* we picked our own avie (allows "mouse steering" and the self pie menu)
LLTool* pCurTool = LLToolMgr::getInstance()->getCurrentTool();
if ( (LLToolDragAndDrop::getInstance() != pCurTool) &&
(!LLToolCamera::getInstance()->hasMouseCapture()) &&
((LLToolPie::getInstance() != pCurTool) || (gAgent.getID() != found->getID())) )
{
found = NULL;
}
}
#endif // RLV_EXTENSION_CMD_INTERACT
// [/RLVa:KB]
}
}
return found;

Some files were not shown because too many files have changed in this diff Show More