commit
0046a76489
|
|
@ -0,0 +1 @@
|
|||
54ad5d2837e09f9005b1772f2273b3ce4301ef6a
|
||||
12
.hgtags
12
.hgtags
|
|
@ -1147,4 +1147,14 @@ e9d350764dfbf5a46229e627547ef5c1b1eeef00 SL-4.0.2
|
|||
450de775fff66a011be1a001acd117cc623c445d SL-4.0.5
|
||||
4070611edd95eb3a683d1cd97c4c07fe67793812 SL-4.0.6
|
||||
33981d8130f031597b4c7f4c981b18359afb61a0 SL-4.0.7
|
||||
45eaee56883df7a439ed3300c44d3126f7e3a41e SL-4.0.8
|
||||
45eaee56883df7a439ed3300c44d3126f7e3a41e SL-4.0.8
|
||||
89532c8dfd5b6c29f1cb032665b44a74a52452e1 RLVa-1.3.0
|
||||
7bc5039ccf0b36eafbf6ce33a52b5e26332aa04c RLVa-1.3.1
|
||||
a563f7e215c7883c1cfd20908085687a0ed96284 RLVa-1.4.0
|
||||
40644beae9c4a617504163d5c9f195dc7bfff1b4 RLVa-1.4.1
|
||||
8787094c309a44ca32b7472acc9217a3c37f00c3 RLVa-1.4.2
|
||||
11c6c85ddd223bcbd6b3afc53f9a0f5fd349ba65 RLVa-1.4.3
|
||||
53b44208d44a601fe24e78c1a1909dc82356cded RLVa-1.4.4
|
||||
6522747820037cc11e5b7d0491a0a9808a958709 RLVa-1.4.5
|
||||
0c8f23b2c4cf96d1a08bd527b3ccb6339a9fdb60 RLVa-1.4.6
|
||||
674db463770b78f836fc9c87a1b2235e212a576c RLVa-1.4.7
|
||||
|
|
|
|||
|
|
@ -52,6 +52,17 @@ LLControlGroup gSavedSettings("Global"); // saved at end of session
|
|||
LLControlGroup gSavedPerAccountSettings("PerAccount"); // saved at end of session
|
||||
LLControlGroup gWarningSettings("Warnings"); // persists ignored dialogs/warnings
|
||||
|
||||
// [RLVa:KB] - Checked: 2010-11-12 (RLVa-1.2.2a) | Added: RLVa-1.2.2a
|
||||
#include "llavatarname.h"
|
||||
|
||||
// Stub for rlvGetAnonym
|
||||
const std::string& rlvGetAnonym(const LLAvatarName& avName)
|
||||
{
|
||||
static std::string strAnonym = "A resident";
|
||||
return strAnonym;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
// We can't create LLImageGL objects because we have no window or rendering
|
||||
// context. Provide enough of an LLUIImage to test the LLUI library without
|
||||
// an underlying image.
|
||||
|
|
|
|||
|
|
@ -103,7 +103,15 @@ void LLWearableData::pushWearable(const LLWearableType::EType type,
|
|||
}
|
||||
if (canAddWearable(type))
|
||||
{
|
||||
mWearableDatas[type].push_back(wearable);
|
||||
// [RLVa:KB] - Checked: 2010-06-08 (RLVa-1.2.0)
|
||||
// Don't add the same wearable twice
|
||||
U32 idxWearable = 0;
|
||||
if (!getWearableIndex(wearable, idxWearable))
|
||||
mWearableDatas[type].push_back(wearable);
|
||||
else
|
||||
llassert(false); // pushWearable() on an already added wearable is a bug *somewhere*
|
||||
// [/RLVa:KB]
|
||||
// mWearableDatas[type].push_back(wearable); mWearableDatas[type].push_back(wearable);
|
||||
if (trigger_updated)
|
||||
{
|
||||
const BOOL removed = FALSE;
|
||||
|
|
@ -150,16 +158,16 @@ void LLWearableData::eraseWearable(const LLWearableType::EType type, U32 index)
|
|||
}
|
||||
}
|
||||
|
||||
void LLWearableData::clearWearableType(const LLWearableType::EType type)
|
||||
{
|
||||
wearableentry_map_t::iterator wearable_iter = mWearableDatas.find(type);
|
||||
if (wearable_iter == mWearableDatas.end())
|
||||
{
|
||||
return;
|
||||
}
|
||||
wearableentry_vec_t& wearable_vec = wearable_iter->second;
|
||||
wearable_vec.clear();
|
||||
}
|
||||
//void LLWearableData::clearWearableType(const LLWearableType::EType type)
|
||||
//{
|
||||
// wearableentry_map_t::iterator wearable_iter = mWearableDatas.find(type);
|
||||
// if (wearable_iter == mWearableDatas.end())
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
// wearableentry_vec_t& wearable_vec = wearable_iter->second;
|
||||
// wearable_vec.clear();
|
||||
//}
|
||||
|
||||
bool LLWearableData::swapWearables(const LLWearableType::EType type, U32 index_a, U32 index_b)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ protected:
|
|||
virtual void wearableUpdated(LLWearable *wearable, BOOL removed);
|
||||
void eraseWearable(LLWearable *wearable);
|
||||
void eraseWearable(const LLWearableType::EType type, U32 index);
|
||||
void clearWearableType(const LLWearableType::EType type);
|
||||
// void clearWearableType(const LLWearableType::EType type);
|
||||
bool swapWearables(const LLWearableType::EType type, U32 index_a, U32 index_b);
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -73,6 +73,12 @@ class LLWearableDictionary : public LLSingleton<LLWearableDictionary>,
|
|||
{
|
||||
public:
|
||||
LLWearableDictionary();
|
||||
|
||||
// [RLVa:KB] - Checked: 2010-03-03 (RLVa-1.2.0a) | Added: RLVa-1.2.0a
|
||||
protected:
|
||||
// The default implementation asserts on 'notFound()' and returns -1 which isn't a valid EWearableType
|
||||
virtual LLWearableType::EType notFound() const { return LLWearableType::WT_INVALID; }
|
||||
// [/RLVa:KB]
|
||||
};
|
||||
|
||||
LLWearableDictionary::LLWearableDictionary()
|
||||
|
|
|
|||
|
|
@ -51,6 +51,11 @@ namespace LLAvatarNameCache
|
|||
{
|
||||
use_display_name_signal_t mUseDisplayNamesSignal;
|
||||
|
||||
// [RLVa:KB] - Checked: 2010-12-08 (RLVa-1.4.0a) | Added: RLVa-1.2.2c
|
||||
// RLVa override for display names
|
||||
bool sForceDisplayNames = false;
|
||||
// [/RLVa:KB]
|
||||
|
||||
// Cache starts in a paused state until we can determine if the
|
||||
// current region supports display names.
|
||||
bool sRunning = false;
|
||||
|
|
@ -724,10 +729,30 @@ LLAvatarNameCache::callback_connection_t LLAvatarNameCache::get(const LLUUID& ag
|
|||
return connection;
|
||||
}
|
||||
|
||||
// [RLVa:KB] - Checked: 2010-12-08 (RLVa-1.4.0a) | Added: RLVa-1.2.2c
|
||||
bool LLAvatarNameCache::getForceDisplayNames()
|
||||
{
|
||||
return sForceDisplayNames;
|
||||
}
|
||||
|
||||
void LLAvatarNameCache::setForceDisplayNames(bool force)
|
||||
{
|
||||
sForceDisplayNames = force;
|
||||
if ( (!LLAvatarName::useDisplayNames()) && (force) )
|
||||
{
|
||||
LLAvatarName::setUseDisplayNames(true);
|
||||
}
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
void LLAvatarNameCache::setUseDisplayNames(bool use)
|
||||
{
|
||||
// [RLVa:KB] - Checked: 2010-12-08 (RLVa-1.4.0a) | Added: RLVa-1.2.2c
|
||||
// We need to force the use of the "display names" cache when @shownames=n restricted (and disallow toggling it)
|
||||
use |= getForceDisplayNames();
|
||||
// [/RLVa:KB]
|
||||
if (use != LLAvatarName::useDisplayNames())
|
||||
|
||||
{
|
||||
LLAvatarName::setUseDisplayNames(use);
|
||||
mUseDisplayNamesSignal();
|
||||
|
|
|
|||
|
|
@ -82,6 +82,12 @@ namespace LLAvatarNameCache
|
|||
void setUseUsernames(bool use);
|
||||
|
||||
void insert(const LLUUID& agent_id, const LLAvatarName& av_name);
|
||||
|
||||
// [RLVa:KB] - Checked: 2010-12-08 (RLVa-1.4.0a) | Added: RLVa-1.2.2c
|
||||
bool getForceDisplayNames();
|
||||
void setForceDisplayNames(bool force);
|
||||
// [/RLVa:KB]
|
||||
|
||||
void erase(const LLUUID& agent_id);
|
||||
|
||||
/// Provide some fallback for agents that return errors.
|
||||
|
|
|
|||
|
|
@ -81,6 +81,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(),
|
||||
|
|
@ -98,6 +102,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;
|
||||
|
|
|
|||
|
|
@ -469,6 +469,9 @@ public:
|
|||
|
||||
// *WORKAROUND: two methods to overload appropriate Params due to localization issue:
|
||||
// no_items_msg & no_filtered_items_msg attributes are not defined as translatable in VLT. See EXT-5931
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.3
|
||||
const std::string& getNoItemsMsg() const { return mNoItemsMsg; }
|
||||
// [/RLVa:KB]
|
||||
void setNoItemsMsg(const std::string& msg) { mNoItemsMsg = msg; }
|
||||
void setNoFilteredItemsMsg(const std::string& msg) { mNoFilteredItemsMsg = msg; }
|
||||
|
||||
|
|
|
|||
|
|
@ -45,6 +45,10 @@ std::set<std::string> LLFloaterReg::sAlwaysShowableList;
|
|||
|
||||
static LLFloaterRegListener sFloaterRegListener;
|
||||
|
||||
// [RLVa:KB] - Checked: 2010-02-28 (RLVa-1.4.0a) | Modified: RLVa-1.2.0a
|
||||
LLFloaterReg::validate_signal_t LLFloaterReg::mValidateSignal;
|
||||
// [/RLVa:KB]
|
||||
|
||||
//*******************************************************
|
||||
|
||||
//static
|
||||
|
|
@ -240,12 +244,23 @@ LLFloaterReg::const_instance_list_t& LLFloaterReg::getFloaterList(const std::str
|
|||
|
||||
// Visibility Management
|
||||
|
||||
// [RLVa:KB] - Checked: 2012-02-07 (RLVa-1.4.5) | Added: RLVa-1.4.5
|
||||
//static
|
||||
bool LLFloaterReg::canShowInstance(const std::string& name, const LLSD& key)
|
||||
{
|
||||
return mValidateSignal(name, key);
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
//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.4.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)
|
||||
|
|
|
|||
|
|
@ -32,6 +32,10 @@
|
|||
|
||||
#include <list>
|
||||
#include <boost/function.hpp>
|
||||
// [RLVa:KB] - Checked: 2011-05-25 (RLVa-1.4.0a)
|
||||
#include <boost/signals2.hpp>
|
||||
#include "llboost.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
//*******************************************************
|
||||
//
|
||||
|
|
@ -72,6 +76,15 @@ private:
|
|||
*/
|
||||
static std::set<std::string> sAlwaysShowableList;
|
||||
|
||||
// [RLVa:KB] - Checked: 2010-02-28 (RLVa-1.4.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
|
||||
|
||||
|
|
@ -100,6 +113,10 @@ public:
|
|||
static const_instance_list_t& getFloaterList(const std::string& name);
|
||||
|
||||
// Visibility Management
|
||||
// [RLVa:KB] - Checked: 2012-02-07 (RLVa-1.4.5) | Added: RLVa-1.4.5
|
||||
// return false if floater can not be shown (=doesn't pass the validation filter)
|
||||
static bool canShowInstance(const std::string& name, const LLSD& key = LLSD());
|
||||
// [/RLVa:KB]
|
||||
// return NULL if instance not found or can't create instance (no builder)
|
||||
static LLFloater* showInstance(const std::string& name, const LLSD& key = LLSD(), BOOL focus = FALSE);
|
||||
// Close a floater (may destroy or set invisible)
|
||||
|
|
|
|||
|
|
@ -918,6 +918,13 @@ std::string LLNotification::getLabel() const
|
|||
return (mTemplatep ? label : "");
|
||||
}
|
||||
|
||||
// [SL:KB] - Patch: UI-Notifications | Checked: 2011-04-11 (Catznip-2.5.0a) | Added: Catznip-2.5.0a
|
||||
bool LLNotification::hasLabel() const
|
||||
{
|
||||
return !mTemplatep->mLabel.empty();
|
||||
}
|
||||
// [/SL:KB]
|
||||
|
||||
std::string LLNotification::getURL() const
|
||||
{
|
||||
if (!mTemplatep)
|
||||
|
|
|
|||
|
|
@ -532,6 +532,10 @@ public:
|
|||
return mTimestamp;
|
||||
}
|
||||
|
||||
// [SL:KB] - Patch: UI-Notifications | Checked: 2011-04-11 (Catznip-2.5.0a) | Added: Catznip-2.5.0a
|
||||
bool hasLabel() const;
|
||||
// [/SL:KB]
|
||||
|
||||
bool getOfferFromAgent() const
|
||||
{
|
||||
return mOfferFromAgent;
|
||||
|
|
|
|||
|
|
@ -1221,6 +1221,9 @@ void LLToolBarButton::setEnabled(BOOL enabled)
|
|||
mImageOverlayColor = mImageOverlayDisabledColor;
|
||||
mImageOverlaySelectedColor = mImageOverlayDisabledColor;
|
||||
}
|
||||
// [RLVa:KB] - Checked: 2011-12-17 (RLVa-1.4.5a) | Added: RLVa-1.4.5a
|
||||
LLButton::setEnabled(enabled);
|
||||
// [/RLVa:KB]
|
||||
}
|
||||
|
||||
const std::string LLToolBarButton::getToolTip() const
|
||||
|
|
|
|||
|
|
@ -201,6 +201,9 @@ void LLUI::initClass(const settings_map_t& settings,
|
|||
// Used by menus along with Floater.Toggle to display visibility as a check-mark
|
||||
LLUICtrl::EnableCallbackRegistry::defaultRegistrar().add("Floater.Visible", boost::bind(&LLFloaterReg::instanceVisible, _2, LLSD()));
|
||||
LLUICtrl::EnableCallbackRegistry::defaultRegistrar().add("Floater.IsOpen", boost::bind(&LLFloaterReg::instanceVisible, _2, LLSD()));
|
||||
// [RLVa:KB] - Checked: 2012-02-07 (RLVa-1.4.5) | Added: RLVa-1.4.5
|
||||
LLUICtrl::EnableCallbackRegistry::defaultRegistrar().add("Floater.CanShow", boost::bind(&LLFloaterReg::canShowInstance, _2, LLSD()));
|
||||
// [/RLVa:KB]
|
||||
|
||||
// Parse the master list of commands
|
||||
LLCommandManager::load();
|
||||
|
|
|
|||
|
|
@ -792,6 +792,27 @@ std::string LLUrlEntryAgentUserName::getName(const LLAvatarName& avatar_name)
|
|||
return avatar_name.getAccountName();
|
||||
}
|
||||
|
||||
// [RLVa:KB] - Checked: 2010-11-01 (RLVa-1.2.2a) | Added: RLVa-1.2.2a
|
||||
|
||||
// Defined in rlvcommon.cpp - redirects to RlvStrings::getAnonym() since we can't really get to that class from here
|
||||
extern const std::string& rlvGetAnonym(const LLAvatarName& avName);
|
||||
|
||||
//
|
||||
// LLUrlEntryAgentRLVAnonymizedName Describes an RLV anonymized agent name Url, e.g.,
|
||||
// secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/rlvanonym
|
||||
// x-grid-location-info://lincoln.lindenlab.com/app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/rlvanonym
|
||||
//
|
||||
LLUrlEntryAgentRLVAnonymizedName::LLUrlEntryAgentRLVAnonymizedName()
|
||||
{
|
||||
mPattern = boost::regex(APP_HEADER_REGEX "/agent/[\\da-f-]+/rlvanonym", boost::regex::perl|boost::regex::icase);
|
||||
}
|
||||
|
||||
std::string LLUrlEntryAgentRLVAnonymizedName::getName(const LLAvatarName& avatar_name)
|
||||
{
|
||||
return rlvGetAnonym(avatar_name);
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
//
|
||||
// LLUrlEntryGroup Describes a Second Life group Url, e.g.,
|
||||
// secondlife:///app/group/00005ff3-4044-c79f-9de8-fb28ae0df991/about
|
||||
|
|
|
|||
|
|
@ -295,6 +295,21 @@ private:
|
|||
/*virtual*/ std::string getName(const LLAvatarName& avatar_name);
|
||||
};
|
||||
|
||||
// [RLVa:KB] - Checked: 2010-11-01 (RLVa-1.2.2a) | Added: RLVa-1.2.2a
|
||||
///
|
||||
/// LLUrlEntryAgentRLVAnonymizedName Describes an RLV anonymized agent name Url, e.g.,
|
||||
/// secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/rlvanonym
|
||||
/// that diplays an anonym (based on the display name) for an avatar
|
||||
/// such as "An individual"
|
||||
class LLUrlEntryAgentRLVAnonymizedName : public LLUrlEntryAgentName
|
||||
{
|
||||
public:
|
||||
LLUrlEntryAgentRLVAnonymizedName();
|
||||
private:
|
||||
/*virtual*/ std::string getName(const LLAvatarName& avatar_name);
|
||||
};
|
||||
// [/RLVa:KB]
|
||||
|
||||
///
|
||||
/// LLUrlEntryExperienceProfile Describes a Second Life experience profile Url, e.g.,
|
||||
/// secondlife:///app/experience/0e346d8b-4433-4d66-a6b0-fd37083abc4c/profile
|
||||
|
|
|
|||
|
|
@ -38,7 +38,10 @@ void LLUrlRegistryNullCallback(const std::string &url, const std::string &label,
|
|||
|
||||
LLUrlRegistry::LLUrlRegistry()
|
||||
{
|
||||
mUrlEntry.reserve(20);
|
||||
// mUrlEntry.reserve(20);
|
||||
// [RLVa:KB] - Checked: 2010-11-01 (RLVa-1.2.2a) | Added: RLVa-1.2.2a
|
||||
mUrlEntry.reserve(21);
|
||||
// [/RLVa:KB]
|
||||
|
||||
// Urls are matched in the order that they were registered
|
||||
mUrlEntryNoLink = new LLUrlEntryNoLink();
|
||||
|
|
@ -59,6 +62,9 @@ LLUrlRegistry::LLUrlRegistry()
|
|||
registerUrl(new LLUrlEntryAgentCompleteName());
|
||||
registerUrl(new LLUrlEntryAgentDisplayName());
|
||||
registerUrl(new LLUrlEntryAgentUserName());
|
||||
// [RLVa:KB] - Checked: 2010-11-01 (RLVa-1.2.2a) | Added: RLVa-1.2.2a
|
||||
registerUrl(new LLUrlEntryAgentRLVAnonymizedName());
|
||||
// [/RLVa:KB]
|
||||
// LLUrlEntryAgent*Name must appear before LLUrlEntryAgent since
|
||||
// LLUrlEntryAgent is a less specific (catchall for agent urls)
|
||||
registerUrl(new LLUrlEntryAgent());
|
||||
|
|
|
|||
|
|
@ -34,6 +34,15 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
// [RLVa:KB] - Checked: 2010-11-12 (RLVa-1.2.2a) | Added: RLVa-1.2.2a
|
||||
// Stub for rlvGetAnonym
|
||||
const std::string& rlvGetAnonym(const LLAvatarName& avName)
|
||||
{
|
||||
static std::string strAnonym = "A resident";
|
||||
return strAnonym;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
// Stub for LLAvatarNameCache
|
||||
bool LLAvatarNameCache::get(const LLUUID& agent_id, LLAvatarName *av_name)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -703,6 +703,15 @@ set(viewer_SOURCE_FILES
|
|||
llxmlrpctransaction.cpp
|
||||
noise.cpp
|
||||
pipeline.cpp
|
||||
rlvactions.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
|
||||
|
|
@ -1313,6 +1322,16 @@ set(viewer_HEADER_FILES
|
|||
macmain.h
|
||||
noise.h
|
||||
pipeline.h
|
||||
rlvactions.h
|
||||
rlvdefines.h
|
||||
rlvhandler.h
|
||||
rlvhelper.h
|
||||
rlvcommon.h
|
||||
rlvlocks.h
|
||||
rlvinventory.h
|
||||
rlvextensions.h
|
||||
rlvfloaters.h
|
||||
rlvui.h
|
||||
roles_constants.h
|
||||
VertexCache.h
|
||||
VorbisFramework.h
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@
|
|||
tooltip_ref="Command_AboutLand_Tooltip"
|
||||
execute_function="Floater.ToggleOrBringToFront"
|
||||
execute_parameters="about_land"
|
||||
is_enabled_function="Floater.CanShow"
|
||||
is_enabled_parameters="about_land"
|
||||
is_running_function="Floater.IsOpen"
|
||||
is_running_parameters="about_land"
|
||||
/>
|
||||
|
|
@ -98,6 +100,8 @@
|
|||
tooltip_ref="Command_Inventory_Tooltip"
|
||||
execute_function="Floater.ToggleOrBringToFront"
|
||||
execute_parameters="inventory"
|
||||
is_enabled_function="RLV.EnableIfNot"
|
||||
is_enabled_parameters="showinv"
|
||||
is_running_function="Floater.IsOpen"
|
||||
is_running_parameters="inventory"
|
||||
/>
|
||||
|
|
@ -108,6 +112,8 @@
|
|||
tooltip_ref="Command_Map_Tooltip"
|
||||
execute_function="Floater.ToggleOrBringToFront"
|
||||
execute_parameters="world_map"
|
||||
is_enabled_function="RLV.EnableIfNot"
|
||||
is_enabled_parameters="showworldmap"
|
||||
is_running_function="Floater.IsOpen"
|
||||
is_running_parameters="world_map"
|
||||
/>
|
||||
|
|
@ -137,6 +143,8 @@
|
|||
tooltip_ref="Command_MiniMap_Tooltip"
|
||||
execute_function="Floater.ToggleOrBringToFront"
|
||||
execute_parameters="mini_map"
|
||||
is_enabled_function="RLV.EnableIfNot"
|
||||
is_enabled_parameters="showminimap"
|
||||
is_running_function="Floater.IsOpen"
|
||||
is_running_parameters="mini_map"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -2,6 +2,259 @@
|
|||
<llsd xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="llsd.xsd">
|
||||
<map>
|
||||
<key>RestrainedLove</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Toggles RLVa features (requires restart)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<boolean>1</boolean>
|
||||
</map>
|
||||
<key>RestrainedLoveDebug</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Toggles RLVa 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>
|
||||
<boolean>0</boolean>
|
||||
</map>
|
||||
<key>RestrainedLoveCanOOC</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Allows sending OOC chat when send chat restricted, or seeing OOC chat when receive chat restricted</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<boolean>1</boolean>
|
||||
</map>
|
||||
<key>RestrainedLoveForbidGiveToRLV</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>When TRUE, forbids to give sub-folders to the #RLV folder</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<boolean>0</boolean>
|
||||
</map>
|
||||
<key>RestrainedLoveNoSetEnv</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>When TRUE, forbids to set the environment (time of day and Windlight settings) via RLVa. (requires restart)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<boolean>0</boolean>
|
||||
</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>RestrainedLoveShowEllipsis</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>When TRUE, show "..." when someone speaks, while the avatar is prevented from hearing. When FALSE, don't show anything.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<boolean>1</boolean>
|
||||
</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>RLVaCompatibilityModeList</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Contains a list of creators or partial items names that require compatibility mode handling (see wiki for more information and syntax)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string></string>
|
||||
</map>
|
||||
<key>RLVaDebugDeprecateExplicitPoint</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Ignore attachment point names on inventory items and categories (incomplete)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<boolean>0</boolean>
|
||||
</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>
|
||||
<boolean>0</boolean>
|
||||
</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>
|
||||
<boolean>0</boolean>
|
||||
</map>
|
||||
<key>RLVaEnableIMQuery</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Enables a limited number of configuration queries via IM (e.g. @version)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<boolean>1</boolean>
|
||||
</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>
|
||||
<boolean>1</boolean>
|
||||
</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>
|
||||
<boolean>1</boolean>
|
||||
</map>
|
||||
<key>RLVaEnableTemporaryAttachments</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Allows temporary attachments (regardless of origin) to issue RLV commands</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<boolean>1</boolean>
|
||||
</map>
|
||||
<key>RLVaExperimentalCommands</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Enables the experimental command set</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<boolean>1</boolean>
|
||||
</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>
|
||||
<boolean>0</boolean>
|
||||
</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>
|
||||
<boolean>0</boolean>
|
||||
</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>
|
||||
<boolean>1</boolean>
|
||||
</map>
|
||||
<key>RLVaShowAssertionFailures</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Notify the user when an assertion fails</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<boolean>1</boolean>
|
||||
</map>
|
||||
<key>RLVaTopLevelMenu</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Show the RLVa specific menu as a top level menu</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<boolean>1</boolean>
|
||||
</map>
|
||||
<key>RLVaWearReplaceUnlocked</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Don't block wear replace when at least one attachment on the target attachment point is non-detachable</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<boolean>1</boolean>
|
||||
</map>
|
||||
<key>ImporterDebug</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -4339,6 +4592,17 @@
|
|||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>ForceMissingType</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Force this wearable type to be missing from COF</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>U32</string>
|
||||
<key>Value</key>
|
||||
<integer>255</integer>
|
||||
</map>
|
||||
<key>FreezeTime</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -6816,6 +7080,17 @@
|
|||
<key>Value</key>
|
||||
<integer>305</integer>
|
||||
</map>
|
||||
<key>NotificationCanEmbedInIM</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Controls notification panel embedding in IMs (0 = default, 1 = focused, 2 = never)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>S32</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>NotificationConferenceIMOptions</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -11129,7 +11404,7 @@
|
|||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
<boolean>1</boolean>
|
||||
</map>
|
||||
<key>NearbyListShowIcons</key>
|
||||
<map>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,16 @@
|
|||
<llsd>
|
||||
<map>
|
||||
<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>
|
||||
<boolean>1</boolean>
|
||||
</map>
|
||||
<key>AvatarHoverOffsetZ</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
|
|||
|
|
@ -93,6 +93,12 @@
|
|||
#include "stringize.h"
|
||||
#include "boost/foreach.hpp"
|
||||
#include "llcorehttputil.h"
|
||||
// [RLVa:KB] - Checked: 2011-11-04 (RLVa-1.4.4a)
|
||||
#include "rlvactions.h"
|
||||
#include "rlvhandler.h"
|
||||
#include "rlvhelper.h"
|
||||
#include "rlvui.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
using namespace LLAvatarAppearanceDefines;
|
||||
|
||||
|
|
@ -202,7 +208,10 @@ private:
|
|||
class LLTeleportRequestViaLocationLookAt : public LLTeleportRequestViaLocation
|
||||
{
|
||||
public:
|
||||
LLTeleportRequestViaLocationLookAt(const LLVector3d &pPosGlobal);
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.0
|
||||
LLTeleportRequestViaLocationLookAt(const LLVector3d &pPosGlobal, const LLVector3& look_at);
|
||||
// [/RLVa:KB]
|
||||
// LLTeleportRequestViaLocationLookAt(const LLVector3d &pPosGlobal);
|
||||
virtual ~LLTeleportRequestViaLocationLookAt();
|
||||
|
||||
virtual bool canRestartTeleport();
|
||||
|
|
@ -211,8 +220,14 @@ public:
|
|||
virtual void restartTeleport();
|
||||
|
||||
protected:
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.0
|
||||
const LLVector3& getLookAt() const { return mLookAt; }
|
||||
// [/RLVa:KB]
|
||||
|
||||
private:
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.0
|
||||
LLVector3 mLookAt;
|
||||
// [/RLVa:KB]
|
||||
|
||||
};
|
||||
|
||||
|
|
@ -356,7 +371,10 @@ LLAgent::LLAgent() :
|
|||
mDoubleTapRunMode(DOUBLETAP_NONE),
|
||||
|
||||
mbAlwaysRun(false),
|
||||
mbRunning(false),
|
||||
// mbRunning(false),
|
||||
// [RLVa:KB] - Checked: 2011-05-11 (RLVa-1.3.0i) | Added: RLVa-1.3.0i
|
||||
mbTempRun(false),
|
||||
// [/RLVa:KB]
|
||||
mbTeleportKeepsLookAt(false),
|
||||
|
||||
mAgentAccess(new LLAgentAccess(gSavedSettings)),
|
||||
|
|
@ -525,11 +543,11 @@ LLAgent::~LLAgent()
|
|||
//-----------------------------------------------------------------------------
|
||||
void LLAgent::onAppFocusGained()
|
||||
{
|
||||
if (CAMERA_MODE_MOUSELOOK == gAgentCamera.getCameraMode())
|
||||
{
|
||||
gAgentCamera.changeCameraToDefault();
|
||||
LLToolMgr::getInstance()->clearSavedTool();
|
||||
}
|
||||
// if (CAMERA_MODE_MOUSELOOK == gAgentCamera.getCameraMode())
|
||||
// {
|
||||
// gAgentCamera.changeCameraToDefault();
|
||||
// LLToolMgr::getInstance()->clearSavedTool();
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -715,6 +733,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();
|
||||
|
|
@ -763,6 +784,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)
|
||||
{
|
||||
|
|
@ -825,7 +853,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()) || (RlvActions::canStand()) )
|
||||
{
|
||||
setControlFlags(AGENT_CONTROL_STAND_UP);
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
}
|
||||
|
||||
void LLAgent::changeParcels()
|
||||
|
|
@ -921,7 +956,10 @@ void LLAgent::setRegion(LLViewerRegion *regionp)
|
|||
|
||||
LLSelectMgr::getInstance()->updateSelectionCenter();
|
||||
|
||||
LLFloaterMove::sUpdateFlyingStatus();
|
||||
// LLFloaterMove::sUpdateFlyingStatus();
|
||||
// [RLVa:KB] - Checked: 2011-05-27 (RLVa-1.4.0a) | Added: RLVa-1.4.0a
|
||||
LLFloaterMove::sUpdateMovementStatus();
|
||||
// [/RLVa:KB]
|
||||
|
||||
LL_DEBUGS("AgentLocation") << "Calling RegionChanged callbacks" << LL_ENDL;
|
||||
mRegionChangedSignal();
|
||||
|
|
@ -1149,7 +1187,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()) || ((RlvActions::canStand()) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SIT))) )
|
||||
{
|
||||
setControlFlags(AGENT_CONTROL_SIT_ON_GROUND);
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1895,7 +1940,10 @@ std::ostream& operator<<(std::ostream &s, const LLAgent &agent)
|
|||
//-----------------------------------------------------------------------------
|
||||
BOOL LLAgent::needsRenderAvatar()
|
||||
{
|
||||
if (gAgentCamera.cameraMouselook() && !LLVOAvatar::sVisibleInFirstPerson)
|
||||
// if (gAgentCamera.cameraMouselook() && !LLVOAvatar::sVisibleInFirstPerson)
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.2
|
||||
if ( (gAgentCamera.cameraMouselook() && !LLVOAvatar::sVisibleInFirstPerson) || (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWSELF)) )
|
||||
// [/RLVa:KB]
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -1906,7 +1954,10 @@ BOOL LLAgent::needsRenderAvatar()
|
|||
// TRUE if we need to render your own avatar's head.
|
||||
BOOL LLAgent::needsRenderHead()
|
||||
{
|
||||
return (LLVOAvatar::sVisibleInFirstPerson && LLPipeline::sReflectionRender) || (mShowAvatar && !gAgentCamera.cameraMouselook());
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.2
|
||||
return ((LLVOAvatar::sVisibleInFirstPerson && LLPipeline::sReflectionRender) || (mShowAvatar && !gAgentCamera.cameraMouselook())) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWSELFHEAD));
|
||||
// [/RLVa:KB]
|
||||
// return (LLVOAvatar::sVisibleInFirstPerson && LLPipeline::sReflectionRender) || (mShowAvatar && !gAgentCamera.cameraMouselook());
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -2432,7 +2483,11 @@ 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
|
||||
if (!gRlvHandler.hasBehaviour(RLV_BHVR_ALLOWIDLE))
|
||||
clearAFK();
|
||||
// [/RLVa:KB]
|
||||
// clearAFK();
|
||||
}
|
||||
else if (id == ANIM_AGENT_STANDUP)
|
||||
{
|
||||
|
|
@ -3097,7 +3152,36 @@ void LLAgent::sendRevokePermissions(const LLUUID & target, U32 permissions)
|
|||
}
|
||||
}
|
||||
|
||||
void LLAgent::sendWalkRun(bool running)
|
||||
// [RLVa:KB] - Checked: 2011-05-11 (RLVa-1.3.0i) | Added: RLVa-1.3.0i
|
||||
void LLAgent::setAlwaysRun()
|
||||
{
|
||||
mbAlwaysRun = (!rlv_handler_t::isEnabled()) || (!gRlvHandler.hasBehaviour(RLV_BHVR_ALWAYSRUN));
|
||||
sendWalkRun();
|
||||
}
|
||||
|
||||
void LLAgent::setTempRun()
|
||||
{
|
||||
mbTempRun = (!rlv_handler_t::isEnabled()) || (!gRlvHandler.hasBehaviour(RLV_BHVR_TEMPRUN));
|
||||
sendWalkRun();
|
||||
}
|
||||
|
||||
void LLAgent::clearAlwaysRun()
|
||||
{
|
||||
mbAlwaysRun = false;
|
||||
sendWalkRun();
|
||||
}
|
||||
|
||||
void LLAgent::clearTempRun()
|
||||
{
|
||||
mbTempRun = false;
|
||||
sendWalkRun();
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
//void LLAgent::sendWalkRun(bool running)
|
||||
// [RLVa:KB] - Checked: 2011-05-11 (RLVa-1.3.0i) | Added: RLVa-1.3.0i
|
||||
void LLAgent::sendWalkRun()
|
||||
// [/RLVa:KB]
|
||||
{
|
||||
LLMessageSystem* msgsys = gMessageSystem;
|
||||
if (msgsys)
|
||||
|
|
@ -3106,7 +3190,10 @@ void LLAgent::sendWalkRun(bool running)
|
|||
msgsys->nextBlockFast(_PREHASH_AgentData);
|
||||
msgsys->addUUIDFast(_PREHASH_AgentID, getID());
|
||||
msgsys->addUUIDFast(_PREHASH_SessionID, getSessionID());
|
||||
msgsys->addBOOLFast(_PREHASH_AlwaysRun, BOOL(running) );
|
||||
// msgsys->addBOOLFast(_PREHASH_AlwaysRun, BOOL(running) );
|
||||
// [RLVa:KB] - Checked: 2011-05-11 (RLVa-1.3.0i) | Added: RLVa-1.3.0i
|
||||
msgsys->addBOOLFast(_PREHASH_AlwaysRun, BOOL(getRunning()) );
|
||||
// [/RLVa:KB]
|
||||
sendReliableMessage();
|
||||
}
|
||||
}
|
||||
|
|
@ -3931,10 +4018,13 @@ void LLAgent::handleTeleportFailed()
|
|||
}
|
||||
}
|
||||
|
||||
void LLAgent::teleportRequest(
|
||||
const U64& region_handle,
|
||||
const LLVector3& pos_local,
|
||||
bool look_at_from_camera)
|
||||
//void LLAgent::teleportRequest(
|
||||
// const U64& region_handle,
|
||||
// const LLVector3& pos_local,
|
||||
// bool look_at_from_camera)
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.0
|
||||
void LLAgent::teleportRequest(const U64& region_handle, const LLVector3& pos_local, const LLVector3& look_at)
|
||||
// [/RLVa:KB]
|
||||
{
|
||||
LLViewerRegion* regionp = getRegion();
|
||||
bool is_local = (region_handle == regionp->getHandle());
|
||||
|
|
@ -3950,11 +4040,11 @@ void LLAgent::teleportRequest(
|
|||
msg->nextBlockFast(_PREHASH_Info);
|
||||
msg->addU64("RegionHandle", region_handle);
|
||||
msg->addVector3("Position", pos_local);
|
||||
LLVector3 look_at(0,1,0);
|
||||
if (look_at_from_camera)
|
||||
{
|
||||
look_at = LLViewerCamera::getInstance()->getAtAxis();
|
||||
}
|
||||
// LLVector3 look_at(0,1,0);
|
||||
// if (look_at_from_camera)
|
||||
// {
|
||||
// look_at = LLViewerCamera::getInstance()->getAtAxis();
|
||||
// }
|
||||
msg->addVector3("LookAt", look_at);
|
||||
sendReliableMessage();
|
||||
}
|
||||
|
|
@ -3963,6 +4053,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())) ))
|
||||
{
|
||||
RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_TELEPORT);
|
||||
return;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
mTeleportRequest = LLTeleportRequestPtr(new LLTeleportRequestViaLandmark(landmark_asset_id));
|
||||
startTeleportRequest();
|
||||
}
|
||||
|
|
@ -4055,6 +4157,22 @@ void LLAgent::restoreCanceledTeleportRequest()
|
|||
|
||||
void LLAgent::teleportViaLocation(const LLVector3d& pos_global)
|
||||
{
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.0
|
||||
if ( (RlvActions::isRlvEnabled()) && (!RlvUtil::isForceTp()) )
|
||||
{
|
||||
if ( (RlvActions::isLocalTp(pos_global)) ? !RlvActions::canTeleportToLocal(pos_global) : !RlvActions::canTeleportToLocation() )
|
||||
{
|
||||
RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_TELEPORT);
|
||||
return;
|
||||
}
|
||||
|
||||
if ( (gRlvHandler.getCurrentCommand()) && (RLV_BHVR_TPTO == gRlvHandler.getCurrentCommand()->getBehaviourType()) )
|
||||
{
|
||||
gRlvHandler.setCanCancelTp(false);
|
||||
}
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
mTeleportRequest = LLTeleportRequestPtr(new LLTeleportRequestViaLocation(pos_global));
|
||||
startTeleportRequest();
|
||||
}
|
||||
|
|
@ -4107,15 +4225,37 @@ void LLAgent::doTeleportViaLocation(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: RLVa-2.0.0
|
||||
void LLAgent::teleportViaLocationLookAt(const LLVector3d& pos_global, const LLVector3& look_at)
|
||||
{
|
||||
mTeleportRequest = LLTeleportRequestPtr(new LLTeleportRequestViaLocationLookAt(pos_global));
|
||||
if ( (RlvActions::isRlvEnabled()) && (!RlvUtil::isForceTp()) )
|
||||
{
|
||||
if ( (RlvActions::isLocalTp(pos_global)) ? !RlvActions::canTeleportToLocal(pos_global) : !RlvActions::canTeleportToLocation() )
|
||||
{
|
||||
RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_TELEPORT);
|
||||
return;
|
||||
}
|
||||
|
||||
if ( (gRlvHandler.getCurrentCommand()) && (RLV_BHVR_TPTO == gRlvHandler.getCurrentCommand()->getBehaviourType()) )
|
||||
{
|
||||
gRlvHandler.setCanCancelTp(false);
|
||||
}
|
||||
}
|
||||
|
||||
mTeleportRequest = LLTeleportRequestPtr(new LLTeleportRequestViaLocationLookAt(pos_global, (look_at.isExactlyZero()) ? LLViewerCamera::getInstance()->getAtAxis() : look_at));
|
||||
startTeleportRequest();
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
//void LLAgent::teleportViaLocationLookAt(const LLVector3d& pos_global)
|
||||
//{
|
||||
// mTeleportRequest = LLTeleportRequestPtr(new LLTeleportRequestViaLocationLookAt(pos_global));
|
||||
// startTeleportRequest();
|
||||
//}
|
||||
|
||||
void LLAgent::doTeleportViaLocationLookAt(const LLVector3d& pos_global)
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.0
|
||||
void LLAgent::doTeleportViaLocationLookAt(const LLVector3d& pos_global, const LLVector3& look_at)
|
||||
{
|
||||
mbTeleportKeepsLookAt = true;
|
||||
mbTeleportKeepsLookAt = look_at.isExactlyZero();
|
||||
|
||||
if(!gAgentCamera.isfollowCamLocked())
|
||||
{
|
||||
|
|
@ -4124,8 +4264,23 @@ void LLAgent::doTeleportViaLocationLookAt(const LLVector3d& pos_global)
|
|||
|
||||
U64 region_handle = to_region_handle(pos_global);
|
||||
LLVector3 pos_local = (LLVector3)(pos_global - from_region_handle(region_handle));
|
||||
teleportRequest(region_handle, pos_local, getTeleportKeepsLookAt());
|
||||
teleportRequest(region_handle, pos_local, look_at);
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
//void LLAgent::doTeleportViaLocationLookAt(const LLVector3d& pos_global, const LLVector3& look_at)
|
||||
//{
|
||||
// mbTeleportKeepsLookAt = true;
|
||||
//
|
||||
// if(!gAgentCamera.isfollowCamLocked())
|
||||
// {
|
||||
// gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); // detach camera form avatar, so it keeps direction
|
||||
// }
|
||||
//
|
||||
// U64 region_handle = to_region_handle(pos_global);
|
||||
// LLVector3 pos_local = (LLVector3)(pos_global - from_region_handle(region_handle));
|
||||
// teleportRequest(region_handle, pos_local, look_at);
|
||||
// teleportRequest(region_handle, pos_local, getTeleportKeepsLookAt());
|
||||
//}
|
||||
|
||||
LLAgent::ETeleportState LLAgent::getTeleportState() const
|
||||
{
|
||||
|
|
@ -4594,11 +4749,18 @@ void LLTeleportRequestViaLocation::restartTeleport()
|
|||
// LLTeleportRequestViaLocationLookAt
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
LLTeleportRequestViaLocationLookAt::LLTeleportRequestViaLocationLookAt(const LLVector3d &pPosGlobal)
|
||||
: LLTeleportRequestViaLocation(pPosGlobal)
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.0
|
||||
LLTeleportRequestViaLocationLookAt::LLTeleportRequestViaLocationLookAt(const LLVector3d &pPosGlobal, const LLVector3& look_at)
|
||||
: LLTeleportRequestViaLocation(pPosGlobal), mLookAt(look_at)
|
||||
{
|
||||
LL_INFOS("Teleport") << "LLTeleportRequestViaLocationLookAt created" << LL_ENDL;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
//LLTeleportRequestViaLocationLookAt::LLTeleportRequestViaLocationLookAt(const LLVector3d &pPosGlobal)
|
||||
// : LLTeleportRequestViaLocation(pPosGlobal)
|
||||
//{
|
||||
//}
|
||||
|
||||
LLTeleportRequestViaLocationLookAt::~LLTeleportRequestViaLocationLookAt()
|
||||
{
|
||||
|
|
@ -4614,13 +4776,19 @@ bool LLTeleportRequestViaLocationLookAt::canRestartTeleport()
|
|||
void LLTeleportRequestViaLocationLookAt::startTeleport()
|
||||
{
|
||||
LL_INFOS("Teleport") << "LLTeleportRequestViaLocationLookAt::startTeleport" << LL_ENDL;
|
||||
gAgent.doTeleportViaLocationLookAt(getPosGlobal());
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.0
|
||||
gAgent.doTeleportViaLocationLookAt(getPosGlobal(), getLookAt());
|
||||
// [/RLVa:KB]
|
||||
// gAgent.doTeleportViaLocationLookAt(getPosGlobal());
|
||||
}
|
||||
|
||||
void LLTeleportRequestViaLocationLookAt::restartTeleport()
|
||||
{
|
||||
LL_INFOS("Teleport") << "LLTeleportRequestViaLocationLookAt::restartTeleport" << LL_ENDL;
|
||||
gAgent.doTeleportViaLocationLookAt(getPosGlobal());
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.0
|
||||
gAgent.doTeleportViaLocationLookAt(getPosGlobal(), getLookAt());
|
||||
// [/RLVa:KB]
|
||||
// gAgent.doTeleportViaLocationLookAt(getPosGlobal());
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
|
|
|||
|
|
@ -408,19 +408,31 @@ public:
|
|||
DOUBLETAP_SLIDERIGHT
|
||||
};
|
||||
|
||||
void setAlwaysRun() { mbAlwaysRun = true; }
|
||||
void clearAlwaysRun() { mbAlwaysRun = false; }
|
||||
void setRunning() { mbRunning = true; }
|
||||
void clearRunning() { mbRunning = false; }
|
||||
void sendWalkRun(bool running);
|
||||
// [RLVa:KB] - Checked: 2011-05-11 (RLVa-1.3.0i) | Added: RLVa-1.3.0i
|
||||
void setAlwaysRun();
|
||||
void setTempRun();
|
||||
void clearAlwaysRun();
|
||||
void clearTempRun();
|
||||
void sendWalkRun();
|
||||
bool getTempRun() { return mbTempRun; }
|
||||
bool getRunning() const { return (mbAlwaysRun) || (mbTempRun); }
|
||||
// [/RLVa:KB]
|
||||
// void setAlwaysRun() { mbAlwaysRun = true; }
|
||||
// void clearAlwaysRun() { mbAlwaysRun = false; }
|
||||
// void setRunning() { mbRunning = true; }
|
||||
// void clearRunning() { mbRunning = false; }
|
||||
// void sendWalkRun(bool running);
|
||||
bool getAlwaysRun() const { return mbAlwaysRun; }
|
||||
bool getRunning() const { return mbRunning; }
|
||||
// bool getRunning() const { return mbRunning; }
|
||||
public:
|
||||
LLFrameTimer mDoubleTapRunTimer;
|
||||
EDoubleTapRunMode mDoubleTapRunMode;
|
||||
private:
|
||||
bool mbAlwaysRun; // Should the avatar run by default rather than walk?
|
||||
bool mbRunning; // Is the avatar trying to run right now?
|
||||
// [RLVa:KB] - Checked: 2011-05-11 (RLVa-1.3.0i) | Added: RLVa-1.3.0i
|
||||
bool mbTempRun;
|
||||
// [/RLVa:KB]
|
||||
// bool mbRunning; // Is the avatar trying to run right now?
|
||||
bool mbTeleportKeepsLookAt; // Try to keep look-at after teleport is complete
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
|
@ -628,7 +640,10 @@ public:
|
|||
void teleportHome() { teleportViaLandmark(LLUUID::null); } // Go home
|
||||
void teleportViaLure(const LLUUID& lure_id, BOOL godlike); // To an invited location
|
||||
void teleportViaLocation(const LLVector3d& pos_global); // To a global location - this will probably need to be deprecated
|
||||
void teleportViaLocationLookAt(const LLVector3d& pos_global);// To a global location, preserving camera rotation
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.0
|
||||
void teleportViaLocationLookAt(const LLVector3d& pos_global, const LLVector3& look_at = LLVector3::zero);// To a global location, preserving camera rotation
|
||||
// [/RLVa:KB]
|
||||
// void teleportViaLocationLookAt(const LLVector3d& pos_global);// To a global location, preserving camera rotation
|
||||
void teleportCancel(); // May or may not be allowed by server
|
||||
void restoreCanceledTeleportRequest();
|
||||
bool getTeleportKeepsLookAt() { return mbTeleportKeepsLookAt; } // Whether look-at reset after teleport
|
||||
|
|
@ -665,13 +680,19 @@ private:
|
|||
bool hasPendingTeleportRequest();
|
||||
void startTeleportRequest();
|
||||
|
||||
void teleportRequest(const U64& region_handle,
|
||||
const LLVector3& pos_local, // Go to a named location home
|
||||
bool look_at_from_camera = false);
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.0
|
||||
void teleportRequest(const U64& region_handle, const LLVector3& pos_local, const LLVector3& look_at = LLVector3(0, 1, 0));
|
||||
// [/RLVa:KB]
|
||||
// void teleportRequest(const U64& region_handle,
|
||||
// const LLVector3& pos_local, // Go to a named location home
|
||||
// bool look_at_from_camera = false);
|
||||
void doTeleportViaLandmark(const LLUUID& landmark_id); // Teleport to a landmark
|
||||
void doTeleportViaLure(const LLUUID& lure_id, BOOL godlike); // To an invited location
|
||||
void doTeleportViaLocation(const LLVector3d& pos_global); // To a global location - this will probably need to be deprecated
|
||||
void doTeleportViaLocationLookAt(const LLVector3d& pos_global);// To a global location, preserving camera rotation
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.0
|
||||
void doTeleportViaLocationLookAt(const LLVector3d& pos_global, const LLVector3& look_at);// To a global location, preserving camera rotation
|
||||
// [/RLVa:KB]
|
||||
// void doTeleportViaLocationLookAt(const LLVector3d& pos_global);// To a global location, preserving camera rotation
|
||||
|
||||
void handleTeleportFinished();
|
||||
void handleTeleportFailed();
|
||||
|
|
|
|||
|
|
@ -50,6 +50,10 @@
|
|||
#include "llvoavatarself.h"
|
||||
#include "llwindow.h"
|
||||
#include "llworld.h"
|
||||
// [RLVa:KB] - Checked: 2010-05-10 (RLVa-1.2.0g)
|
||||
#include "rlvactions.h"
|
||||
#include "rlvhandler.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
using namespace LLAvatarAppearanceDefines;
|
||||
|
||||
|
|
@ -208,10 +212,18 @@ void LLAgentCamera::init()
|
|||
mCameraOffsetInitial[CAMERA_PRESET_REAR_VIEW] = gSavedSettings.getControl("CameraOffsetRearView");
|
||||
mCameraOffsetInitial[CAMERA_PRESET_FRONT_VIEW] = gSavedSettings.getControl("CameraOffsetFrontView");
|
||||
mCameraOffsetInitial[CAMERA_PRESET_GROUP_VIEW] = gSavedSettings.getControl("CameraOffsetGroupView");
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.0
|
||||
mCameraOffsetInitial[CAMERA_RLV_SETCAM_VIEW] = gSavedSettings.declareVec3("CameraOffsetRLVaView", LLVector3(mCameraOffsetInitial[CAMERA_PRESET_REAR_VIEW]->getDefault()), "Declared in code", LLControlVariable::PERSIST_NO);
|
||||
mCameraOffsetInitial[CAMERA_RLV_SETCAM_VIEW]->setHiddenFromSettingsEditor(true);
|
||||
// [/RLVa:KB]
|
||||
|
||||
mFocusOffsetInitial[CAMERA_PRESET_REAR_VIEW] = gSavedSettings.getControl("FocusOffsetRearView");
|
||||
mFocusOffsetInitial[CAMERA_PRESET_FRONT_VIEW] = gSavedSettings.getControl("FocusOffsetFrontView");
|
||||
mFocusOffsetInitial[CAMERA_PRESET_GROUP_VIEW] = gSavedSettings.getControl("FocusOffsetGroupView");
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.0
|
||||
mFocusOffsetInitial[CAMERA_RLV_SETCAM_VIEW] = gSavedSettings.declareVec3("FocusOffsetRLVaView", LLVector3(mFocusOffsetInitial[CAMERA_PRESET_REAR_VIEW]->getDefault()), "Declared in code", LLControlVariable::PERSIST_NO);
|
||||
mFocusOffsetInitial[CAMERA_RLV_SETCAM_VIEW]->setHiddenFromSettingsEditor(true);
|
||||
// [/RLVa:KB]
|
||||
|
||||
mCameraCollidePlane.clearVec();
|
||||
mCurrentCameraDistance = getCameraOffsetInitial().magVec() * gSavedSettings.getF32("CameraOffsetScale");
|
||||
|
|
@ -809,7 +821,13 @@ void LLAgentCamera::setCameraZoomFraction(F32 fraction)
|
|||
|
||||
LLVector3d camera_offset_dir = mCameraFocusOffsetTarget;
|
||||
camera_offset_dir.normalize();
|
||||
mCameraFocusOffsetTarget = camera_offset_dir * rescale(fraction, 0.f, 1.f, max_zoom, min_zoom);
|
||||
// [RLVa:KB] - Checked: 2.0.0
|
||||
const LLVector3d focus_offset_target = camera_offset_dir * rescale(fraction, 0.f, 1.f, max_zoom, min_zoom);
|
||||
if ( (RlvActions::isRlvEnabled()) && (!allowFocusOffsetChange(focus_offset_target)) )
|
||||
return;
|
||||
mCameraFocusOffsetTarget = focus_offset_target;
|
||||
// [/RLVa:KB]
|
||||
// mCameraFocusOffsetTarget = camera_offset_dir * rescale(fraction, 0.f, 1.f, max_zoom, min_zoom);
|
||||
}
|
||||
startCameraAnimation();
|
||||
}
|
||||
|
|
@ -934,6 +952,11 @@ void LLAgentCamera::cameraZoomIn(const F32 fraction)
|
|||
new_distance = llclamp( new_distance, APPEARANCE_MIN_ZOOM, APPEARANCE_MAX_ZOOM );
|
||||
}
|
||||
|
||||
// [RLVa:KB] - Checked: 2.0.0
|
||||
if ( (RlvActions::isRlvEnabled()) && (!allowFocusOffsetChange(new_distance * camera_offset_unit)) )
|
||||
return;
|
||||
// [/RLVa:KB]
|
||||
|
||||
mCameraFocusOffsetTarget = new_distance * camera_offset_unit;
|
||||
}
|
||||
|
||||
|
|
@ -997,6 +1020,11 @@ void LLAgentCamera::cameraOrbitIn(const F32 meters)
|
|||
new_distance = llclamp( new_distance, APPEARANCE_MIN_ZOOM, APPEARANCE_MAX_ZOOM );
|
||||
}
|
||||
|
||||
// [RLVa:KB] - Checked: 2.0.0
|
||||
if ( (RlvActions::isRlvEnabled()) && (!allowFocusOffsetChange(new_distance * camera_offset_unit)) )
|
||||
return;
|
||||
// [/RLVa:KB]
|
||||
|
||||
// Compute new camera offset
|
||||
mCameraFocusOffsetTarget = new_distance * camera_offset_unit;
|
||||
cameraZoomIn(1.f);
|
||||
|
|
@ -1141,6 +1169,14 @@ void LLAgentCamera::updateCamera()
|
|||
mCameraUpVector = LLVector3::z_axis;
|
||||
//LLVector3 camera_skyward(0.f, 0.f, 1.f);
|
||||
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.0
|
||||
// Set focus back on our avie if something changed it
|
||||
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SETCAM_UNLOCK)) && (cameraThirdPerson()) && (!getFocusOnAvatar()) )
|
||||
{
|
||||
setFocusOnAvatar(TRUE, FALSE);
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
U32 camera_mode = mCameraAnimating ? mLastCameraMode : mCameraMode;
|
||||
|
||||
validateFocusObject();
|
||||
|
|
@ -1911,6 +1947,44 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit)
|
|||
// }
|
||||
}
|
||||
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.0
|
||||
if ( (CAMERA_MODE_THIRD_PERSON == mCameraMode) && (RlvActions::isRlvEnabled()) && (RlvActions::isCameraDistanceClamped()) )
|
||||
{
|
||||
m_fRlvMinDist = m_fRlvMaxDist = false;
|
||||
|
||||
// Av-locked | Focus-locked | Result
|
||||
// ===================================================
|
||||
// T | T | skip focus => slam av
|
||||
// T | F | skip focus => slam av
|
||||
// F | T | skip av => slam focus
|
||||
// F | F | clamp focus then av
|
||||
bool fCamAvDistClamped, fCamAvDistLocked = false; float nCamAvDistLimitMin, nCamAvDistLimitMax;
|
||||
if (fCamAvDistClamped = RlvActions::getCameraAvatarDistanceLimits(nCamAvDistLimitMin, nCamAvDistLimitMax))
|
||||
fCamAvDistLocked = nCamAvDistLimitMin == nCamAvDistLimitMax;
|
||||
bool fCamOriginDistClamped, fCamOriginDistLocked = false; float nCamOriginDistLimitMin, nCamOriginDistLimitMax;
|
||||
if (fCamOriginDistClamped = RlvActions::getCameraOriginDistanceLimits(nCamOriginDistLimitMin, nCamOriginDistLimitMax))
|
||||
fCamOriginDistLocked = nCamOriginDistLimitMin == nCamOriginDistLimitMax;
|
||||
|
||||
// Check focus distance limits
|
||||
if ( (fCamOriginDistClamped) && (!fCamAvDistLocked) )
|
||||
{
|
||||
const LLVector3 offsetCameraLocal = mCameraZoomFraction * getCameraOffsetInitial() * gSavedSettings.getF32("CameraOffsetScale");
|
||||
const LLVector3d offsetCamera(gAgent.getFrameAgent().rotateToAbsolute(offsetCameraLocal));
|
||||
const LLVector3d posFocusCam = frame_center_global + head_offset + offsetCamera;
|
||||
if (clampCameraPosition(camera_position_global, posFocusCam, nCamOriginDistLimitMin, nCamOriginDistLimitMax))
|
||||
isConstrained = TRUE;
|
||||
}
|
||||
|
||||
// Check avatar distance limits
|
||||
if ( (fCamAvDistClamped) && (fCamAvDistLocked || !fCamOriginDistClamped) )
|
||||
{
|
||||
const LLVector3d posAvatarCam = gAgent.getPosGlobalFromAgent( (isAgentAvatarValid()) ? gAgentAvatarp->mHeadp->getWorldPosition() : gAgent.getPositionAgent() );
|
||||
if (clampCameraPosition(camera_position_global, posAvatarCam, nCamAvDistLimitMin, nCamAvDistLimitMax))
|
||||
isConstrained = TRUE;
|
||||
}
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
// Don't let camera go underground
|
||||
F32 camera_min_off_ground = getCameraMinOffGround();
|
||||
|
||||
|
|
@ -1931,6 +2005,49 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit)
|
|||
return camera_position_global;
|
||||
}
|
||||
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.0
|
||||
bool LLAgentCamera::allowFocusOffsetChange(const LLVector3d& offsetFocus)
|
||||
{
|
||||
if (RlvActions::isCameraDistanceClamped())
|
||||
{
|
||||
if ( (CAMERA_MODE_THIRD_PERSON == getCameraMode()) && ((m_fRlvMinDist) || (m_fRlvMaxDist)) )
|
||||
{
|
||||
const LLVector3d posFocusGlobal = calcFocusPositionTargetGlobal();
|
||||
// Don't allow moving the focus offset if at minimum and moving closer (or if at maximum and moving further) to prevent camera warping
|
||||
F32 nCurDist = llabs((posFocusGlobal + mCameraFocusOffsetTarget - m_posRlvRefGlobal).magVec());
|
||||
F32 nNewDist = llabs((posFocusGlobal + offsetFocus - m_posRlvRefGlobal).magVec());
|
||||
if ( ((m_fRlvMaxDist) && (nNewDist > nCurDist)) || ((m_fRlvMinDist) && (nNewDist < nCurDist)) )
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool LLAgentCamera::clampCameraPosition(LLVector3d& posCamGlobal, const LLVector3d posCamRefGlobal, float nDistMin, float nDistMax)
|
||||
{
|
||||
const LLVector3d offsetCamera = posCamGlobal - posCamRefGlobal;
|
||||
|
||||
F32 nCamAvDist = llabs(offsetCamera.magVec()), nDistMult = NAN;
|
||||
if (nCamAvDist > nDistMax)
|
||||
{
|
||||
nDistMult = nDistMax / nCamAvDist;
|
||||
m_fRlvMaxDist = true;
|
||||
}
|
||||
else if (nCamAvDist < nDistMin)
|
||||
{
|
||||
nDistMult = nDistMin / nCamAvDist;
|
||||
m_fRlvMinDist = true;
|
||||
}
|
||||
|
||||
if (!isnan(nDistMult))
|
||||
{
|
||||
posCamGlobal = posCamRefGlobal + nDistMult * offsetCamera;
|
||||
m_posRlvRefGlobal = posCamRefGlobal;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
LLVector3 LLAgentCamera::getCameraOffsetInitial()
|
||||
{
|
||||
|
|
@ -2033,6 +2150,10 @@ void LLAgentCamera::resetCamera()
|
|||
void LLAgentCamera::changeCameraToMouselook(BOOL animate)
|
||||
{
|
||||
if (!gSavedSettings.getBOOL("EnableMouselook")
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.0
|
||||
|| ( (RlvActions::isRlvEnabled()) && (!RlvActions::canChangeToMouselook()) )
|
||||
// [/RLVa:KB]
|
||||
|
||||
|| LLViewerJoystick::getInstance()->getOverrideCamera())
|
||||
{
|
||||
return;
|
||||
|
|
@ -2058,8 +2179,8 @@ void LLAgentCamera::changeCameraToMouselook(BOOL animate)
|
|||
|
||||
//gViewerWindow->stopGrab();
|
||||
LLSelectMgr::getInstance()->deselectAll();
|
||||
gViewerWindow->hideCursor();
|
||||
gViewerWindow->moveCursorToCenter();
|
||||
// gViewerWindow->hideCursor();
|
||||
// gViewerWindow->moveCursorToCenter();
|
||||
|
||||
if (mCameraMode != CAMERA_MODE_MOUSELOOK)
|
||||
{
|
||||
|
|
@ -2253,6 +2374,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()) && (!RlvActions::canStand()) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
gAgent.standUp(); // force stand up
|
||||
gViewerWindow->getWindow()->resetBusyCount();
|
||||
|
||||
|
|
@ -2314,6 +2442,26 @@ void LLAgentCamera::changeCameraToCustomizeAvatar()
|
|||
|
||||
void LLAgentCamera::switchCameraPreset(ECameraPreset preset)
|
||||
{
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.0
|
||||
if (RlvActions::isRlvEnabled())
|
||||
{
|
||||
// Don't allow changing away from the our view if an object is restricting it
|
||||
if (RlvActions::isCameraPresetLocked())
|
||||
preset = CAMERA_RLV_SETCAM_VIEW;
|
||||
|
||||
// Don't reset anything if our view is already current
|
||||
if ( (CAMERA_RLV_SETCAM_VIEW == preset) && (CAMERA_RLV_SETCAM_VIEW == mCameraPreset) )
|
||||
return;
|
||||
|
||||
// Reset our view when switching away
|
||||
if (CAMERA_RLV_SETCAM_VIEW != preset)
|
||||
{
|
||||
mCameraOffsetInitial[CAMERA_RLV_SETCAM_VIEW]->resetToDefault();
|
||||
mFocusOffsetInitial[CAMERA_RLV_SETCAM_VIEW]->resetToDefault();
|
||||
}
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
//zoom is supposed to be reset for the front and group views
|
||||
mCameraZoomFraction = 1.f;
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,12 @@ enum ECameraPreset
|
|||
CAMERA_PRESET_FRONT_VIEW,
|
||||
|
||||
/** "Above and to the left, over the shoulder, pulled back a little on the zoom" */
|
||||
CAMERA_PRESET_GROUP_VIEW
|
||||
CAMERA_PRESET_GROUP_VIEW,
|
||||
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.0
|
||||
/* Used by RLVa */
|
||||
CAMERA_RLV_SETCAM_VIEW
|
||||
// [/RLVa:KB]
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
|
|
@ -300,6 +305,18 @@ public:
|
|||
F32 mHUDTargetZoom; // Target zoom level for HUD objects (used when editing)
|
||||
F32 mHUDCurZoom; // Current animated zoom level for HUD objects
|
||||
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.0
|
||||
//--------------------------------------------------------------------
|
||||
// RLVa
|
||||
//--------------------------------------------------------------------
|
||||
protected:
|
||||
bool allowFocusOffsetChange(const LLVector3d& offsetFocus);
|
||||
bool clampCameraPosition(LLVector3d& posCamGlobal, const LLVector3d posCamRefGlobal, float nDistMin, float nDistMax);
|
||||
|
||||
bool m_fRlvMaxDist; // True if the camera is at max distance
|
||||
bool m_fRlvMinDist; // True if the camera is at min distance
|
||||
LLVector3d m_posRlvRefGlobal; // Current reference point for distance calculations
|
||||
// [/RLVa:KB]
|
||||
|
||||
/********************************************************************************
|
||||
** **
|
||||
|
|
|
|||
|
|
@ -43,6 +43,11 @@
|
|||
#include "lltoolgrab.h"
|
||||
#include "llhudeffectlookat.h"
|
||||
#include "llagentcamera.h"
|
||||
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1a)
|
||||
#include "rlvactions.h"
|
||||
#include "rlvhandler.h"
|
||||
#include "llvoavatarself.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
LLAgentListener::LLAgentListener(LLAgent &agent)
|
||||
: LLEventAPI("LLAgent",
|
||||
|
|
@ -179,8 +184,28 @@ void LLAgentListener::requestSit(LLSD const & event_data) const
|
|||
object = findObjectClosestTo(target_position);
|
||||
}
|
||||
|
||||
// [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()) && (!RlvActions::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());
|
||||
|
|
@ -200,6 +225,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()) && (!RlvActions::canStand()) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
mAgent.setControlFlags(AGENT_CONTROL_STAND_UP);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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() )
|
||||
|
|
|
|||
|
|
@ -51,6 +51,10 @@
|
|||
#include "llviewerwearable.h"
|
||||
#include "llwearablelist.h"
|
||||
#include "llfloaterperms.h"
|
||||
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1)
|
||||
#include "rlvhandler.h"
|
||||
#include "rlvlocks.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
||||
|
|
@ -60,6 +64,9 @@ BOOL LLAgentWearables::mInitialWearablesUpdateReceived = FALSE;
|
|||
// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.1)
|
||||
bool LLAgentWearables::mInitialWearablesLoaded = false;
|
||||
// [/SL:KB]
|
||||
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1)
|
||||
bool LLAgentWearables::mInitialAttachmentsRequested = false;
|
||||
// [/RLVa:KB]
|
||||
|
||||
using namespace LLAvatarAppearanceDefines;
|
||||
|
||||
|
|
@ -659,6 +666,34 @@ const LLUUID LLAgentWearables::getWearableItemID(LLWearableType::EType type, U32
|
|||
return LLUUID();
|
||||
}
|
||||
|
||||
// [RLVa:KB] - Checked: 2011-03-31 (RLVa-1.3.0)
|
||||
void LLAgentWearables::getWearableItemIDs(uuid_vec_t& idItems) const
|
||||
{
|
||||
for (wearableentry_map_t::const_iterator itWearableType = mWearableDatas.begin();
|
||||
itWearableType != mWearableDatas.end(); ++itWearableType)
|
||||
{
|
||||
getWearableItemIDs(itWearableType->first, idItems);
|
||||
}
|
||||
}
|
||||
|
||||
void LLAgentWearables::getWearableItemIDs(LLWearableType::EType eType, uuid_vec_t& idItems) const
|
||||
{
|
||||
wearableentry_map_t::const_iterator itWearableType = mWearableDatas.find(eType);
|
||||
if (mWearableDatas.end() != itWearableType)
|
||||
{
|
||||
for (wearableentry_vec_t::const_iterator itWearable = itWearableType->second.begin();
|
||||
itWearable != itWearableType->second.end(); ++itWearable)
|
||||
{
|
||||
const LLViewerWearable* pWearable = dynamic_cast<LLViewerWearable*>(*itWearable);
|
||||
if (pWearable)
|
||||
{
|
||||
idItems.push_back(pWearable->getItemID());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
const LLUUID LLAgentWearables::getWearableAssetID(LLWearableType::EType type, U32 index) const
|
||||
{
|
||||
const LLViewerWearable *wearable = getViewerWearable(type,index);
|
||||
|
|
@ -960,7 +995,11 @@ void LLAgentWearables::removeWearableFinal(const LLWearableType::EType type, boo
|
|||
old_wearable->removeFromAvatar();
|
||||
}
|
||||
}
|
||||
clearWearableType(type);
|
||||
// clearWearableType(type);
|
||||
// [RLVa:KB] - Checked: 2010-05-14 (RLVa-1.2.0)
|
||||
// The line above shouldn't be needed
|
||||
RLV_VERIFY(0 == getWearableCount(type));
|
||||
// [/RLVa:KB]
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1149,146 +1188,140 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
|
|||
|
||||
|
||||
// User has picked "wear on avatar" from a menu.
|
||||
void LLAgentWearables::setWearableItem(LLInventoryItem* new_item, LLViewerWearable* new_wearable, bool do_append)
|
||||
{
|
||||
//LLAgentDumper dumper("setWearableItem");
|
||||
if (isWearingItem(new_item->getUUID()))
|
||||
{
|
||||
LL_WARNS() << "wearable " << new_item->getUUID() << " is already worn" << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
|
||||
const LLWearableType::EType type = new_wearable->getType();
|
||||
|
||||
if (!do_append)
|
||||
{
|
||||
// Remove old wearable, if any
|
||||
// MULTI_WEARABLE: hardwired to 0
|
||||
LLViewerWearable* old_wearable = getViewerWearable(type,0);
|
||||
if (old_wearable)
|
||||
{
|
||||
const LLUUID& old_item_id = old_wearable->getItemID();
|
||||
if ((old_wearable->getAssetID() == new_wearable->getAssetID()) &&
|
||||
(old_item_id == new_item->getUUID()))
|
||||
{
|
||||
LL_DEBUGS() << "No change to wearable asset and item: " << LLWearableType::getTypeName(type) << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
|
||||
if (old_wearable->isDirty())
|
||||
{
|
||||
// Bring up modal dialog: Save changes? Yes, No, Cancel
|
||||
LLSD payload;
|
||||
payload["item_id"] = new_item->getUUID();
|
||||
LLNotificationsUtil::add("WearableSave", LLSD(), payload, boost::bind(onSetWearableDialog, _1, _2, new_wearable));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
setWearableFinal(new_item, new_wearable, do_append);
|
||||
}
|
||||
//void LLAgentWearables::setWearableItem(LLInventoryItem* new_item, LLViewerWearable* new_wearable, bool do_append)
|
||||
//{
|
||||
// //LLAgentDumper dumper("setWearableItem");
|
||||
// if (isWearingItem(new_item->getUUID()))
|
||||
// {
|
||||
// LL_WARNS() << "wearable " << new_item->getUUID() << " is already worn" << LL_ENDL;
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// const LLWearableType::EType type = new_wearable->getType();
|
||||
//
|
||||
// if (!do_append)
|
||||
// {
|
||||
// // Remove old wearable, if any
|
||||
// // MULTI_WEARABLE: hardwired to 0
|
||||
// LLViewerWearable* old_wearable = getViewerWearable(type,0);
|
||||
// if (old_wearable)
|
||||
// {
|
||||
// const LLUUID& old_item_id = old_wearable->getItemID();
|
||||
// if ((old_wearable->getAssetID() == new_wearable->getAssetID()) &&
|
||||
// (old_item_id == new_item->getUUID()))
|
||||
// {
|
||||
// LL_DEBUGS() << "No change to wearable asset and item: " << LLWearableType::getTypeName(type) << LL_ENDL;
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// if (old_wearable->isDirty())
|
||||
// {
|
||||
// // Bring up modal dialog: Save changes? Yes, No, Cancel
|
||||
// LLSD payload;
|
||||
// payload["item_id"] = new_item->getUUID();
|
||||
// LLNotificationsUtil::add("WearableSave", LLSD(), payload, boost::bind(onSetWearableDialog, _1, _2, new_wearable));
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// setWearableFinal(new_item, new_wearable, do_append);
|
||||
//}
|
||||
|
||||
// static
|
||||
bool LLAgentWearables::onSetWearableDialog(const LLSD& notification, const LLSD& response, LLViewerWearable* wearable)
|
||||
{
|
||||
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
LLInventoryItem* new_item = gInventory.getItem(notification["payload"]["item_id"].asUUID());
|
||||
U32 index;
|
||||
if (!gAgentWearables.getWearableIndex(wearable,index))
|
||||
{
|
||||
LL_WARNS() << "Wearable not found" << LL_ENDL;
|
||||
delete wearable;
|
||||
return false;
|
||||
}
|
||||
if (!new_item)
|
||||
{
|
||||
delete wearable;
|
||||
return false;
|
||||
}
|
||||
|
||||
switch(option)
|
||||
{
|
||||
case 0: // "Save"
|
||||
gAgentWearables.saveWearable(wearable->getType(),index);
|
||||
gAgentWearables.setWearableFinal(new_item, wearable);
|
||||
break;
|
||||
|
||||
case 1: // "Don't Save"
|
||||
gAgentWearables.setWearableFinal(new_item, wearable);
|
||||
break;
|
||||
|
||||
case 2: // "Cancel"
|
||||
break;
|
||||
|
||||
default:
|
||||
llassert(0);
|
||||
break;
|
||||
}
|
||||
|
||||
delete wearable;
|
||||
return false;
|
||||
}
|
||||
//bool LLAgentWearables::onSetWearableDialog(const LLSD& notification, const LLSD& response, LLViewerWearable* wearable)
|
||||
//{
|
||||
// S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
// LLInventoryItem* new_item = gInventory.getItem(notification["payload"]["item_id"].asUUID());
|
||||
// U32 index;
|
||||
// if (!gAgentWearables.getWearableIndex(wearable,index))
|
||||
// {
|
||||
// LL_WARNS() << "Wearable not found" << LL_ENDL;
|
||||
// delete wearable;
|
||||
// return false;
|
||||
// }
|
||||
// switch(option)
|
||||
// {
|
||||
// case 0: // "Save"
|
||||
// gAgentWearables.saveWearable(wearable->getType(),index);
|
||||
// gAgentWearables.setWearableFinal(new_item, wearable);
|
||||
// break;
|
||||
//
|
||||
// case 1: // "Don't Save"
|
||||
// gAgentWearables.setWearableFinal(new_item, wearable);
|
||||
// break;
|
||||
//
|
||||
// case 2: // "Cancel"
|
||||
// break;
|
||||
//
|
||||
// default:
|
||||
// llassert(0);
|
||||
// break;
|
||||
// }
|
||||
//
|
||||
// delete wearable;
|
||||
// return false;
|
||||
//}
|
||||
|
||||
// Called from setWearableItem() and onSetWearableDialog() to actually set the wearable.
|
||||
// MULTI_WEARABLE: unify code after null objects are gone.
|
||||
void LLAgentWearables::setWearableFinal(LLInventoryItem* new_item, LLViewerWearable* new_wearable, bool do_append)
|
||||
{
|
||||
const LLWearableType::EType type = new_wearable->getType();
|
||||
|
||||
if (do_append && getWearableItemID(type,0).notNull())
|
||||
{
|
||||
new_wearable->setItemID(new_item->getUUID());
|
||||
const bool trigger_updated = false;
|
||||
pushWearable(type, new_wearable, trigger_updated);
|
||||
LL_INFOS() << "Added additional wearable for type " << type
|
||||
<< " size is now " << getWearableCount(type) << LL_ENDL;
|
||||
checkWearableAgainstInventory(new_wearable);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Replace the old wearable with a new one.
|
||||
llassert(new_item->getAssetUUID() == new_wearable->getAssetID());
|
||||
|
||||
LLViewerWearable *old_wearable = getViewerWearable(type,0);
|
||||
LLUUID old_item_id;
|
||||
if (old_wearable)
|
||||
{
|
||||
old_item_id = old_wearable->getItemID();
|
||||
}
|
||||
new_wearable->setItemID(new_item->getUUID());
|
||||
setWearable(type,0,new_wearable);
|
||||
|
||||
if (old_item_id.notNull())
|
||||
{
|
||||
gInventory.addChangedMask(LLInventoryObserver::LABEL, old_item_id);
|
||||
gInventory.notifyObservers();
|
||||
}
|
||||
LL_INFOS() << "Replaced current element 0 for type " << type
|
||||
<< " size is now " << getWearableCount(type) << LL_ENDL;
|
||||
}
|
||||
}
|
||||
//void LLAgentWearables::setWearableFinal(LLInventoryItem* new_item, LLViewerWearable* new_wearable, bool do_append)
|
||||
//{
|
||||
// const LLWearableType::EType type = new_wearable->getType();
|
||||
//
|
||||
// if (do_append && getWearableItemID(type,0).notNull())
|
||||
// {
|
||||
// new_wearable->setItemID(new_item->getUUID());
|
||||
// const bool trigger_updated = false;
|
||||
// pushWearable(type, new_wearable, trigger_updated);
|
||||
// LL_INFOS() << "Added additional wearable for type " << type
|
||||
// << " size is now " << getWearableCount(type) << LL_ENDL;
|
||||
// checkWearableAgainstInventory(new_wearable);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// // Replace the old wearable with a new one.
|
||||
// llassert(new_item->getAssetUUID() == new_wearable->getAssetID());
|
||||
//
|
||||
// LLViewerWearable *old_wearable = getViewerWearable(type,0);
|
||||
// LLUUID old_item_id;
|
||||
// if (old_wearable)
|
||||
// {
|
||||
// old_item_id = old_wearable->getItemID();
|
||||
// }
|
||||
// new_wearable->setItemID(new_item->getUUID());
|
||||
// setWearable(type,0,new_wearable);
|
||||
//
|
||||
// if (old_item_id.notNull())
|
||||
// {
|
||||
// gInventory.addChangedMask(LLInventoryObserver::LABEL, old_item_id);
|
||||
// gInventory.notifyObservers();
|
||||
// }
|
||||
// LL_INFOS() << "Replaced current element 0 for type " << type
|
||||
// << " size is now " << getWearableCount(type) << LL_ENDL;
|
||||
// }
|
||||
//}
|
||||
|
||||
// User has picked "remove from avatar" from a menu.
|
||||
// static
|
||||
void LLAgentWearables::userRemoveWearable(const LLWearableType::EType &type, const U32 &index)
|
||||
{
|
||||
if (!(type==LLWearableType::WT_SHAPE || type==LLWearableType::WT_SKIN || type==LLWearableType::WT_HAIR || type==LLWearableType::WT_EYES)) //&&
|
||||
//!((!gAgent.isTeen()) && (type==LLWearableType::WT_UNDERPANTS || type==LLWearableType::WT_UNDERSHIRT)))
|
||||
{
|
||||
gAgentWearables.removeWearable(type,false,index);
|
||||
}
|
||||
}
|
||||
//void LLAgentWearables::userRemoveWearable(const LLWearableType::EType &type, const U32 &index)
|
||||
//{
|
||||
// if (!(type==LLWearableType::WT_SHAPE || type==LLWearableType::WT_SKIN || type==LLWearableType::WT_HAIR || type==LLWearableType::WT_EYES)) //&&
|
||||
// //!((!gAgent.isTeen()) && (type==LLWearableType::WT_UNDERPANTS || type==LLWearableType::WT_UNDERSHIRT)))
|
||||
// {
|
||||
// gAgentWearables.removeWearable(type,false,index);
|
||||
// }
|
||||
//}
|
||||
|
||||
//static
|
||||
void LLAgentWearables::userRemoveWearablesOfType(const LLWearableType::EType &type)
|
||||
{
|
||||
if (!(type==LLWearableType::WT_SHAPE || type==LLWearableType::WT_SKIN || type==LLWearableType::WT_HAIR || type==LLWearableType::WT_EYES)) //&&
|
||||
//!((!gAgent.isTeen()) && (type==LLWearableType::WT_UNDERPANTS || type==LLWearableType::WT_UNDERSHIRT)))
|
||||
{
|
||||
gAgentWearables.removeWearable(type,true,0);
|
||||
}
|
||||
}
|
||||
//void LLAgentWearables::userRemoveWearablesOfType(const LLWearableType::EType &type)
|
||||
//{
|
||||
// if (!(type==LLWearableType::WT_SHAPE || type==LLWearableType::WT_SKIN || type==LLWearableType::WT_HAIR || type==LLWearableType::WT_EYES)) //&&
|
||||
// //!((!gAgent.isTeen()) && (type==LLWearableType::WT_UNDERPANTS || type==LLWearableType::WT_UNDERSHIRT)))
|
||||
// {
|
||||
// gAgentWearables.removeWearable(type,true,0);
|
||||
// }
|
||||
//}
|
||||
|
||||
// Given a desired set of attachments, find what objects need to be
|
||||
// removed, and what additional inventory items need to be added.
|
||||
|
|
@ -1378,6 +1411,34 @@ void LLAgentWearables::userRemoveMultipleAttachments(llvo_vec_t& objects_to_remo
|
|||
{
|
||||
if (!isAgentAvatarValid()) return;
|
||||
|
||||
// [RLVa:KB] - Checked: 2010-03-04 (RLVa-1.2.0)
|
||||
// RELEASE-RLVa: [SL-3.4] 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 (objects_to_remove.end() != itObj)
|
||||
{
|
||||
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)
|
||||
bool fInCOF = LLAppearanceMgr::instance().isLinkedInCOF(pAttachObj->getAttachmentItemID());
|
||||
RLV_ASSERT(fInCOF);
|
||||
if (!fInCOF)
|
||||
{
|
||||
LLAppearanceMgr::instance().registerAttachment(pAttachObj->getAttachmentItemID());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
++itObj;
|
||||
}
|
||||
}
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
if (objects_to_remove.empty())
|
||||
return;
|
||||
|
||||
|
|
@ -1419,6 +1480,10 @@ void LLAgentWearables::userAttachMultipleAttachments(LLInventoryModel::item_arra
|
|||
const LLInventoryItem* item = *it;
|
||||
LLAttachmentsMgr::instance().addAttachmentRequest(item->getLinkedUUID(), 0, TRUE);
|
||||
}
|
||||
|
||||
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1)
|
||||
mInitialAttachmentsRequested = true;
|
||||
// [/RLVa:KB]
|
||||
}
|
||||
|
||||
// Returns false if the given wearable is already topmost/bottommost
|
||||
|
|
|
|||
|
|
@ -74,6 +74,9 @@ public:
|
|||
// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.1)
|
||||
bool areInitalWearablesLoaded() const { return mInitialWearablesLoaded; }
|
||||
// [/SL:KB]
|
||||
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1)
|
||||
bool areInitialAttachmentsRequested() const { return mInitialAttachmentsRequested; }
|
||||
// [/RLVa:KB]
|
||||
bool isCOFChangeInProgress() const { return mCOFChangeInProgress; }
|
||||
F32 getCOFChangeTime() const { return mCOFChangeTimer.getElapsedTimeF32(); }
|
||||
void updateWearablesLoaded();
|
||||
|
|
@ -89,6 +92,10 @@ public:
|
|||
// Accessors
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
// [RLVa:KB] - Checked: 2011-03-31 (RLVa-1.3.0)
|
||||
void getWearableItemIDs(uuid_vec_t& idItems) const;
|
||||
void getWearableItemIDs(LLWearableType::EType eType, uuid_vec_t& idItems) const;
|
||||
// [/RLVa:KB]
|
||||
const LLUUID getWearableItemID(LLWearableType::EType type, U32 index /*= 0*/) const;
|
||||
const LLUUID getWearableAssetID(LLWearableType::EType type, U32 index /*= 0*/) const;
|
||||
const LLViewerWearable* getWearableFromItemID(const LLUUID& item_id) const;
|
||||
|
|
@ -105,15 +112,15 @@ public:
|
|||
private:
|
||||
/*virtual*/void wearableUpdated(LLWearable *wearable, BOOL removed);
|
||||
public:
|
||||
void setWearableItem(LLInventoryItem* new_item, LLViewerWearable* wearable, bool do_append = false);
|
||||
// void setWearableItem(LLInventoryItem* new_item, LLViewerWearable* wearable, bool do_append = false);
|
||||
void setWearableOutfit(const LLInventoryItem::item_array_t& items, const std::vector< LLViewerWearable* >& wearables);
|
||||
void setWearableName(const LLUUID& item_id, const std::string& new_name);
|
||||
// *TODO: Move this into llappearance/LLWearableData ?
|
||||
void addLocalTextureObject(const LLWearableType::EType wearable_type, const LLAvatarAppearanceDefines::ETextureIndex texture_type, U32 wearable_index);
|
||||
|
||||
protected:
|
||||
void setWearableFinal(LLInventoryItem* new_item, LLViewerWearable* new_wearable, bool do_append = false);
|
||||
static bool onSetWearableDialog(const LLSD& notification, const LLSD& response, LLViewerWearable* wearable);
|
||||
// void setWearableFinal(LLInventoryItem* new_item, LLViewerWearable* new_wearable, bool do_append = false);
|
||||
// static bool onSetWearableDialog(const LLSD& notification, const LLSD& response, LLViewerWearable* wearable);
|
||||
|
||||
void addWearableToAgentInventory(LLPointer<LLInventoryCallback> cb,
|
||||
LLViewerWearable* wearable,
|
||||
|
|
@ -145,8 +152,11 @@ private:
|
|||
// Removing wearables
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
void removeWearable(const LLWearableType::EType type, bool do_remove_all /*= false*/, U32 index /*= 0*/);
|
||||
// void removeWearable(const LLWearableType::EType type, bool do_remove_all /*= false*/, U32 index /*= 0*/);
|
||||
private:
|
||||
// [RLVa:KB] - Checked: 2010-05-11 (RLVa-1.2.0)
|
||||
void removeWearable(const LLWearableType::EType type, bool do_remove_all /*= false*/, U32 index /*= 0*/);
|
||||
// [/RLVa:KB]
|
||||
void removeWearableFinal(const LLWearableType::EType type, bool do_remove_all /*= false*/, U32 index /*= 0*/);
|
||||
protected:
|
||||
static bool onRemoveWearableDialog(const LLSD& notification, const LLSD& response);
|
||||
|
|
@ -176,8 +186,8 @@ public:
|
|||
// Static UI hooks
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
static void userRemoveWearable(const LLWearableType::EType &type, const U32 &index);
|
||||
static void userRemoveWearablesOfType(const LLWearableType::EType &type);
|
||||
// static void userRemoveWearable(const LLWearableType::EType &type, const U32 &index);
|
||||
// static void userRemoveWearablesOfType(const LLWearableType::EType &type);
|
||||
|
||||
typedef std::vector<LLViewerObject*> llvo_vec_t;
|
||||
|
||||
|
|
@ -222,6 +232,9 @@ private:
|
|||
// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.2)
|
||||
static bool mInitialWearablesLoaded;
|
||||
// [/SL:KB]
|
||||
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1)
|
||||
static bool mInitialAttachmentsRequested;
|
||||
// [/RLVa:KB]
|
||||
BOOL mWearablesLoaded;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -60,6 +60,12 @@
|
|||
#include "llappviewer.h"
|
||||
#include "llcoros.h"
|
||||
#include "lleventcoro.h"
|
||||
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1)
|
||||
#include "rlvactions.h"
|
||||
#include "rlvhandler.h"
|
||||
#include "rlvhelper.h"
|
||||
#include "rlvlocks.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
#include "llavatarpropertiesprocessor.h"
|
||||
|
||||
|
|
@ -1316,6 +1322,25 @@ static void removeDuplicateItems(LLInventoryModel::item_array_t& items)
|
|||
|
||||
//=========================================================================
|
||||
|
||||
// [SL:KB] - Patch: Appearance-WearableDuplicateAssets | Checked: 2015-06-30 (Catznip-3.7)
|
||||
static void removeDuplicateWearableItemsByAssetID(LLInventoryModel::item_array_t& items)
|
||||
{
|
||||
std::set<LLUUID> idsAsset;
|
||||
items.erase(std::remove_if(items.begin(), items.end(),
|
||||
[&idsAsset](const LLViewerInventoryItem* pItem)
|
||||
{
|
||||
if (pItem->isWearableType())
|
||||
{
|
||||
const LLUUID& idAsset = pItem->getAssetUUID();
|
||||
if ( (idAsset.notNull()) && (idsAsset.end() != idsAsset.find(idAsset)) )
|
||||
return true;
|
||||
idsAsset.insert(idAsset);
|
||||
}
|
||||
return false;
|
||||
}), items.end());
|
||||
}
|
||||
// [/SL:KB]
|
||||
|
||||
const LLUUID LLAppearanceMgr::getCOF() const
|
||||
{
|
||||
return gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT);
|
||||
|
|
@ -1473,6 +1498,13 @@ void LLAppearanceMgr::wearItemsOnAvatar(const uuid_vec_t& item_ids_to_wear,
|
|||
continue;
|
||||
}
|
||||
|
||||
// [RLVa:KB] - Checked: 2013-02-12 (RLVa-1.4.8)
|
||||
if ( (rlv_handler_t::isEnabled()) && (!rlvPredCanWearItem(item_to_wear, (replace) ? RLV_WEAR_REPLACE : RLV_WEAR_ADD)) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
switch (item_to_wear->getType())
|
||||
{
|
||||
case LLAssetType::AT_CLOTHING:
|
||||
|
|
@ -1490,9 +1522,9 @@ void LLAppearanceMgr::wearItemsOnAvatar(const uuid_vec_t& item_ids_to_wear,
|
|||
LLUUID item_id = gAgentWearables.getWearableItemID(item_to_wear->getWearableType(),
|
||||
wearable_count-1);
|
||||
// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-05-02 (Catznip-3.7)
|
||||
removeCOFItemLinks(item_id, NULL, true);
|
||||
removeCOFItemLinks(item_id, NULL, true);
|
||||
// [/SL:KB]
|
||||
// removeCOFItemLinks(item_id, cb);
|
||||
// removeCOFItemLinks(item_id, cb);
|
||||
}
|
||||
|
||||
items_to_link.push_back(item_to_wear);
|
||||
|
|
@ -1868,6 +1900,13 @@ bool LLAppearanceMgr::getCanRemoveFromCOF(const LLUUID& outfit_cat_id)
|
|||
{
|
||||
return false;
|
||||
}
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.3
|
||||
if ( (RlvActions::isRlvEnabled()) && (RlvFolderLocks::instance().isLockedFolder(outfit_cat_id, RLV_LOCK_REMOVE)) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
LLInventoryModel::cat_array_t cats;
|
||||
LLInventoryModel::item_array_t items;
|
||||
LLFindWearablesEx is_worn(/*is_worn=*/ true, /*include_body_parts=*/ false);
|
||||
|
|
@ -1887,6 +1926,13 @@ bool LLAppearanceMgr::getCanAddToCOF(const LLUUID& outfit_cat_id)
|
|||
return false;
|
||||
}
|
||||
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.3
|
||||
if ( (RlvActions::isRlvEnabled()) && (RlvFolderLocks::instance().isLockedFolder(outfit_cat_id, RLV_LOCK_ADD)) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
LLInventoryModel::cat_array_t cats;
|
||||
LLInventoryModel::item_array_t items;
|
||||
LLFindWearablesEx not_worn(/*is_worn=*/ false, /*include_body_parts=*/ false);
|
||||
|
|
@ -1907,6 +1953,14 @@ bool LLAppearanceMgr::getCanReplaceCOF(const LLUUID& outfit_cat_id)
|
|||
return false;
|
||||
}
|
||||
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.3
|
||||
// Block "Replace Current Outfit" if the user can't wear the new folder
|
||||
if ( (RlvActions::isRlvEnabled()) && (RlvFolderLocks::instance().isLockedFolder(outfit_cat_id, RLV_LOCK_ADD)) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
// Check whether it's the base outfit.
|
||||
// if (outfit_cat_id.isNull() || outfit_cat_id == getBaseOutfitUUID())
|
||||
// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-21 (Catznip-2.1)
|
||||
|
|
@ -2036,6 +2090,8 @@ void LLAppearanceMgr::filterWearableItems(
|
|||
}
|
||||
}
|
||||
|
||||
//void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append)
|
||||
// [RLVa:KB] - Checked: 2010-03-05 (RLVa-1.2.0)
|
||||
void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append)
|
||||
{
|
||||
LLViewerInventoryCategory *pcat = gInventory.getCategory(category);
|
||||
|
|
@ -2046,6 +2102,32 @@ void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append)
|
|||
}
|
||||
LL_INFOS("Avatar") << self_av_string() << "starting, cat '" << (pcat ? pcat->getName() : "[UNKNOWN]") << "'" << LL_ENDL;
|
||||
|
||||
LLInventoryModel::item_array_t body_items_new, wear_items_new, obj_items_new, gest_items_new;
|
||||
getDescendentsOfAssetType(category, body_items_new, LLAssetType::AT_BODYPART);
|
||||
getDescendentsOfAssetType(category, wear_items_new, LLAssetType::AT_CLOTHING);
|
||||
getDescendentsOfAssetType(category, obj_items_new, LLAssetType::AT_OBJECT);
|
||||
getDescendentsOfAssetType(category, gest_items_new, LLAssetType::AT_GESTURE);
|
||||
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*/, LLPointer<LLInventoryCallback> link_waiter /*= NULL*/)
|
||||
// [/RLVa:KB]
|
||||
{
|
||||
// LLViewerInventoryCategory *pcat = gInventory.getCategory(category);
|
||||
// if (!pcat)
|
||||
// {
|
||||
// LL_WARNS() << "no category found for id " << category << LL_ENDL;
|
||||
// return;
|
||||
// }
|
||||
// LL_INFOS("Avatar") << self_av_string() << "starting, cat '" << (pcat ? pcat->getName() : "[UNKNOWN]") << "'" << LL_ENDL;
|
||||
// [RLVa:KB] - Checked: 2010-03-26 (RLVa-1.2.0)
|
||||
LL_INFOS("Avatar") << "starting" << LL_ENDL;
|
||||
// [/RLVa:KB]
|
||||
|
||||
const LLUUID cof = getCOF();
|
||||
|
||||
// Deactivate currently active gestures in the COF, if replacing outfit
|
||||
|
|
@ -2065,39 +2147,87 @@ 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);
|
||||
getDescendentsOfAssetType(category, body_items, LLAssetType::AT_BODYPART);
|
||||
if (append)
|
||||
reverse(body_items.begin(), body_items.end());
|
||||
// getDescendentsOfAssetType(category, body_items, LLAssetType::AT_BODYPART);
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.3
|
||||
// Filter out any new body parts that can't be worn before adding them
|
||||
if ( (RlvActions::isRlvEnabled()) && ((gRlvWearableLocks.hasLockedWearableType(RLV_LOCK_ANY)) || (RlvFolderLocks::instance().hasLockedFolder(RLV_LOCK_ADD))) )
|
||||
body_items_new.erase(std::remove_if(body_items_new.begin(), body_items_new.end(), RlvPredCanNotWearItem(RLV_WEAR_REPLACE)), 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, 0);
|
||||
|
||||
//
|
||||
// - Wearables: include COF contents only if appending.
|
||||
//
|
||||
LLInventoryModel::item_array_t wear_items;
|
||||
if (append)
|
||||
getDescendentsOfAssetType(cof, wear_items, LLAssetType::AT_CLOTHING);
|
||||
getDescendentsOfAssetType(category, wear_items, LLAssetType::AT_CLOTHING);
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.3
|
||||
else if ( (RlvActions::isRlvEnabled()) && ((gRlvWearableLocks.hasLockedWearableType(RLV_LOCK_ANY)) || (RlvFolderLocks::instance().hasLockedFolder(RLV_LOCK_REMOVE))) )
|
||||
{
|
||||
// Make sure that all currently locked clothing layers remain in COF when replacing
|
||||
getDescendentsOfAssetType(cof, wear_items, LLAssetType::AT_CLOTHING);
|
||||
wear_items.erase(std::remove_if(wear_items.begin(), wear_items.end(), RlvPredCanRemoveItem()), wear_items.end());
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
// getDescendentsOfAssetType(category, wear_items, LLAssetType::AT_CLOTHING);
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.3
|
||||
// Filter out any new wearables that can't be worn before adding them
|
||||
if ( (RlvActions::isRlvEnabled()) && ((gRlvWearableLocks.hasLockedWearableType(RLV_LOCK_ANY)) || (RlvFolderLocks::instance().hasLockedFolder(RLV_LOCK_ADD))) )
|
||||
wear_items_new.erase(std::remove_if(wear_items_new.begin(), wear_items_new.end(), RlvPredCanNotWearItem(RLV_WEAR)), 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);
|
||||
// [SL:KB] - Patch: Appearance-WearableDuplicateAssets | Checked: 2011-07-24 (Catznip-2.6.0e) | Added: Catznip-2.6.0e
|
||||
removeDuplicateWearableItemsByAssetID(wear_items);
|
||||
// [/SL:KB]
|
||||
filterWearableItems(wear_items, 0, LLAgentWearables::MAX_CLOTHING_LAYERS);
|
||||
|
||||
//
|
||||
// - Attachments: include COF contents only if appending.
|
||||
//
|
||||
LLInventoryModel::item_array_t obj_items;
|
||||
if (append)
|
||||
getDescendentsOfAssetType(cof, obj_items, LLAssetType::AT_OBJECT);
|
||||
getDescendentsOfAssetType(category, obj_items, LLAssetType::AT_OBJECT);
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.3
|
||||
else if ( (RlvActions::isRlvEnabled()) && ((gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_ANY)) || (RlvFolderLocks::instance().hasLockedFolder(RLV_LOCK_REMOVE))) )
|
||||
{
|
||||
// Make sure that all currently locked attachments remain in COF when replacing
|
||||
getDescendentsOfAssetType(cof, obj_items, LLAssetType::AT_OBJECT);
|
||||
obj_items.erase(std::remove_if(obj_items.begin(), obj_items.end(), RlvPredCanRemoveItem()), obj_items.end());
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
// getDescendentsOfAssetType(category, obj_items, LLAssetType::AT_OBJECT);
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.3
|
||||
// Filter out any new attachments that can't be worn before adding them
|
||||
if ( (RlvActions::isRlvEnabled()) && ((gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_ANY)) || (RlvFolderLocks::instance().hasLockedFolder(RLV_LOCK_ADD))) )
|
||||
obj_items_new.erase(std::remove_if(obj_items_new.begin(), obj_items_new.end(), RlvPredCanNotWearItem(RLV_WEAR)), 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);
|
||||
getDescendentsOfAssetType(category, gest_items, LLAssetType::AT_GESTURE);
|
||||
// getDescendentsOfAssetType(category, gest_items, LLAssetType::AT_GESTURE);
|
||||
// [RLVa:KB] - Checked: 2010-03-05 (RLVa-1.2.0)
|
||||
gest_items.insert(gest_items.end(), gest_items_new.begin(), gest_items_new.end());
|
||||
// [/RLVa:KB]
|
||||
removeDuplicateItems(gest_items);
|
||||
|
||||
// Create links to new COF contents.
|
||||
|
|
@ -2113,7 +2243,11 @@ void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append)
|
|||
|
||||
// Will link all the above items.
|
||||
// link_waiter enforce flags are false because we've already fixed everything up in updateCOF().
|
||||
LLPointer<LLInventoryCallback> link_waiter = new LLUpdateAppearanceOnDestroy(false,false);
|
||||
// LLPointer<LLInventoryCallback> link_waiter = new LLUpdateAppearanceOnDestroy(false,false);
|
||||
// [RLVa:KB] Checked: 2015-05-05 (RLVa-1.4.12)
|
||||
if (!link_waiter)
|
||||
link_waiter = new LLUpdateAppearanceOnDestroy(false, false);
|
||||
// [/RLVa:KB]
|
||||
LLSD contents = LLSD::emptyArray();
|
||||
|
||||
for (LLInventoryModel::item_array_t::const_iterator it = all_items.begin();
|
||||
|
|
@ -2141,8 +2275,12 @@ void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append)
|
|||
item_contents["type"] = LLAssetType::AT_LINK;
|
||||
contents.append(item_contents);
|
||||
}
|
||||
const LLUUID& base_id = append ? getBaseOutfitUUID() : category;
|
||||
LLViewerInventoryCategory *base_cat = gInventory.getCategory(base_id);
|
||||
// const LLUUID& base_id = append ? getBaseOutfitUUID() : category;
|
||||
// LLViewerInventoryCategory *base_cat = gInventory.getCategory(base_id);
|
||||
// [RLVa:KB] - Checked: 2014-11-02 (RLVa-1.4.11)
|
||||
const LLUUID& base_id = (append) ? getBaseOutfitUUID() : idOutfit;
|
||||
LLViewerInventoryCategory* base_cat = (base_id.notNull()) ? gInventory.getCategory(base_id) : NULL;
|
||||
// [/RLVa:KB]
|
||||
if (base_cat && (base_cat->getPreferredType() == LLFolderType::FT_OUTFIT))
|
||||
{
|
||||
LLSD base_contents;
|
||||
|
|
@ -2194,6 +2332,14 @@ void LLAppearanceMgr::updateAgentWearables(LLWearableHoldingPattern* holder)
|
|||
LLInventoryItem::item_array_t items;
|
||||
std::vector< LLViewerWearable* > wearables;
|
||||
wearables.reserve(32);
|
||||
// [RLVa:KB] - Checked: 2011-03-31 (RLVa-1.3.0)
|
||||
uuid_vec_t idsCurrent; LLInventoryModel::item_array_t itemsNew;
|
||||
if (rlv_handler_t::isEnabled())
|
||||
{
|
||||
// Collect the item UUIDs of all currently worn wearables
|
||||
gAgentWearables.getWearableItemIDs(idsCurrent);
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
// For each wearable type, find the wearables of that type.
|
||||
for( S32 i = 0; i < LLWearableType::WT_COUNT; i++ )
|
||||
|
|
@ -2208,13 +2354,60 @@ void LLAppearanceMgr::updateAgentWearables(LLWearableHoldingPattern* holder)
|
|||
LLViewerInventoryItem* item = (LLViewerInventoryItem*)gInventory.getItem(data.mItemID);
|
||||
if( item && (item->getAssetUUID() == wearable->getAssetID()) )
|
||||
{
|
||||
// [RLVa:KB] - Checked: 2010-03-19 (RLVa-1.2.0)
|
||||
// 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.push_back(item);
|
||||
wearables.push_back(wearable);
|
||||
// [RLVa:KB] - Checked: 2011-03-31 (RLVa-1.3.0)
|
||||
if ( (rlv_handler_t::isEnabled()) && (gAgentWearables.areInitalWearablesLoaded()) )
|
||||
{
|
||||
// Remove the wearable from current item UUIDs if currently worn and requested, otherwise mark it as a new item
|
||||
uuid_vec_t::iterator itItemID = std::find(idsCurrent.begin(), idsCurrent.end(), item->getUUID());
|
||||
if (idsCurrent.end() != itItemID)
|
||||
idsCurrent.erase(itItemID);
|
||||
else
|
||||
itemsNew.push_back(item);
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// [RLVa:KB] - Checked: 2011-03-31 (RLVa-1.3.0)
|
||||
if ( (rlv_handler_t::isEnabled()) && (gAgentWearables.areInitalWearablesLoaded()) )
|
||||
{
|
||||
// We need to report removals before additions or scripts will get confused
|
||||
for (uuid_vec_t::const_iterator itItemID = idsCurrent.begin(); itItemID != idsCurrent.end(); ++itItemID)
|
||||
{
|
||||
const LLWearable* pWearable = gAgentWearables.getWearableFromItemID(*itItemID);
|
||||
if (pWearable)
|
||||
RlvBehaviourNotifyHandler::onTakeOff(pWearable->getType(), true);
|
||||
}
|
||||
for (S32 idxItem = 0, cntItem = itemsNew.size(); idxItem < cntItem; idxItem++)
|
||||
{
|
||||
RlvBehaviourNotifyHandler::onWear(itemsNew.at(idxItem)->getWearableType(), true);
|
||||
}
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
if(wearables.size() > 0)
|
||||
{
|
||||
gAgentWearables.setWearableOutfit(items, wearables);
|
||||
|
|
@ -2403,6 +2596,10 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool enforce_item_restrictions,
|
|||
removeDuplicateItems(gest_items);
|
||||
filterWearableItems(wear_items, LLAgentWearables::MAX_CLOTHING_LAYERS, LLAgentWearables::MAX_CLOTHING_LAYERS);
|
||||
// [/SL:KB]
|
||||
// [SL:KB] - Patch: Appearance-WearableDuplicateAssets | Checked: 2011-07-24 (Catznip-2.6.0e) | Added: Catznip-2.6.0e
|
||||
// Wearing two wearables that share the same asset causes some issues
|
||||
removeDuplicateWearableItemsByAssetID(wear_items);
|
||||
// [/SL:KB]
|
||||
|
||||
dumpItemArray(wear_items,"asset_dump: wear_item");
|
||||
dumpItemArray(obj_items,"asset_dump: obj_item");
|
||||
|
|
@ -2504,6 +2701,9 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool enforce_item_restrictions,
|
|||
// fetch failures (should be replaced by new defaults in
|
||||
// lost&found).
|
||||
U32 skip_type = gSavedSettings.getU32("ForceAssetFail");
|
||||
// [RLVa:KB] - Checked: 2010-12-11 (RLVa-1.2.2)
|
||||
U32 missing_type = gSavedSettings.getU32("ForceMissingType");
|
||||
// [/RLVa:KB]
|
||||
|
||||
if (item && item->getIsLinkType() && linked_item)
|
||||
{
|
||||
|
|
@ -2514,10 +2714,25 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool enforce_item_restrictions,
|
|||
linked_item->isWearableType() ? linked_item->getWearableType() : LLWearableType::WT_INVALID
|
||||
);
|
||||
|
||||
if (skip_type != LLWearableType::WT_INVALID && skip_type == found.mWearableType)
|
||||
// [RLVa:KB] - Checked: 2010-12-15 (RLVa-1.2.2)
|
||||
#ifdef LL_RELEASE_FOR_DOWNLOAD
|
||||
// Don't allow forcing an invalid wearable if the initial wearables aren't set yet, or if any wearable type is currently locked
|
||||
if ( (!rlv_handler_t::isEnabled()) ||
|
||||
((gAgentWearables.areInitalWearablesLoaded()) && (!gRlvWearableLocks.hasLockedWearableType(RLV_LOCK_REMOVE))) )
|
||||
#endif // LL_RELEASE_FOR_DOWNLOAD
|
||||
{
|
||||
found.mAssetID.generate(); // Replace with new UUID, guaranteed not to exist in DB
|
||||
if (missing_type != LLWearableType::WT_INVALID && missing_type == found.mWearableType)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
if (skip_type != LLWearableType::WT_INVALID && skip_type == found.mWearableType)
|
||||
{
|
||||
found.mAssetID.generate(); // Replace with new UUID, guaranteed not to exist in DB
|
||||
}
|
||||
// [RLVa:KB] - Checked: 2010-12-15 (RLVa-1.2.2)
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
//pushing back, not front, to preserve order of wearables for LLAgentWearables
|
||||
holder->getFoundList().push_back(found);
|
||||
}
|
||||
|
|
@ -2897,6 +3112,13 @@ void LLAppearanceMgr::addCOFItemLink(const LLInventoryItem *item,
|
|||
// MULTI-WEARABLES: make sure we don't go over clothing limits
|
||||
remove_inventory_item(inv_item->getUUID(), cb);
|
||||
}
|
||||
// [SL:KB] - Patch: Appearance-WearableDuplicateAssets | Checked: 2011-07-24 (Catznip-2.6.0e) | Added: Catznip-2.6.0e
|
||||
else if ( (vitem->getWearableType() == wearable_type) && (vitem->getAssetUUID() == inv_item->getAssetUUID()) )
|
||||
{
|
||||
// Only allow one wearable per unique asset
|
||||
linked_already = true;
|
||||
}
|
||||
// [/SL:KB]
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3006,9 +3228,15 @@ void LLAppearanceMgr::removeCOFItemLinks(const LLUUID& item_id, LLPointer<LLInve
|
|||
LLInventoryModel::EXCLUDE_TRASH);
|
||||
for (S32 i=0; i<item_array.size(); i++)
|
||||
{
|
||||
const LLInventoryItem* item = item_array.at(i).get();
|
||||
const LLViewerInventoryItem* item = item_array.at(i).get();
|
||||
if (item->getIsLinkType() && item->getLinkedUUID() == item_id)
|
||||
{
|
||||
// [RLVa:KB] - Checked: 2013-02-12 (RLVa-1.4.8)
|
||||
if (rlv_handler_t::isEnabled())
|
||||
{
|
||||
RLV_ASSERT(rlvPredCanRemoveItem(item));
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
// bool immediate_delete = false;
|
||||
// if (item->getType() == LLAssetType::AT_OBJECT)
|
||||
// {
|
||||
|
|
@ -3032,6 +3260,12 @@ void LLAppearanceMgr::removeCOFLinksOfType(LLWearableType::EType type, LLPointer
|
|||
const LLViewerInventoryItem* item = *it;
|
||||
if (item->getIsLinkType()) // we must operate on links only
|
||||
{
|
||||
// [RLVa:KB] - Checked: 2013-02-12 (RLVa-1.4.8)
|
||||
if (rlv_handler_t::isEnabled())
|
||||
{
|
||||
RLV_ASSERT(rlvPredCanRemoveItem(item));
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
remove_inventory_item(item->getUUID(), cb);
|
||||
}
|
||||
}
|
||||
|
|
@ -3896,17 +4130,18 @@ void LLAppearanceMgr::removeItemsFromAvatar(const uuid_vec_t& ids_to_remove, LLP
|
|||
LL_WARNS() << "called with empty list, nothing to do" << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
// LLPointer<LLInventoryCallback> cb = new LLUpdateAppearanceOnDestroy;
|
||||
// [SL:KB] - Patch: Appearance-Misc | Checked: 2015-05-05 (Catznip-3.7)
|
||||
if (!cb)
|
||||
{
|
||||
cb = new LLUpdateAppearanceOnDestroy;
|
||||
}
|
||||
// [/SL:KB]
|
||||
// [RLVa:KB] - Checked: 2013-02-12 (RLVa-1.4.8)
|
||||
// LLPointer<LLInventoryCallback> cb = NULL;
|
||||
for (uuid_vec_t::const_iterator it = ids_to_remove.begin(); it != ids_to_remove.end(); ++it)
|
||||
{
|
||||
const LLUUID& id_to_remove = *it;
|
||||
const LLUUID& linked_item_id = gInventory.getLinkedItemID(id_to_remove);
|
||||
|
||||
if ( (rlv_handler_t::isEnabled()) && (!rlvPredCanRemoveItem(linked_item_id)) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
LLViewerInventoryItem *item = gInventory.getItem(linked_item_id);
|
||||
if (item && item->getType() == LLAssetType::AT_OBJECT)
|
||||
{
|
||||
|
|
@ -3916,15 +4151,33 @@ void LLAppearanceMgr::removeItemsFromAvatar(const uuid_vec_t& ids_to_remove, LLP
|
|||
{
|
||||
continue;
|
||||
}
|
||||
// [SL:KB] - Patch: Appearance-Misc | Checked: 2015-05-05 (Catznip-3.7)
|
||||
|
||||
if (!cb)
|
||||
cb = new LLUpdateAppearanceOnDestroy();
|
||||
removeCOFItemLinks(linked_item_id, cb, immediate_delete);
|
||||
// [/SL:KB]
|
||||
// removeCOFItemLinks(linked_item_id, cb);
|
||||
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2015-03-01 (Catznip-3.7)
|
||||
LLAttachmentsMgr::instance().clearPendingAttachmentLink(linked_item_id);
|
||||
// [/SL:KB]
|
||||
addDoomedTempAttachment(linked_item_id);
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
//// LLPointer<LLInventoryCallback> cb = new LLUpdateAppearanceOnDestroy;
|
||||
//// [SL:KB] - Patch: Appearance-Misc | Checked: 2015-05-05 (Catznip-3.7)
|
||||
// if (!cb)
|
||||
// {
|
||||
// cb = new LLUpdateAppearanceOnDestroy;
|
||||
// }
|
||||
//// [/SL:KB]
|
||||
// for (uuid_vec_t::const_iterator it = ids_to_remove.begin(); it != ids_to_remove.end(); ++it)
|
||||
// {
|
||||
// const LLUUID& id_to_remove = *it;
|
||||
// const LLUUID& linked_item_id = gInventory.getLinkedItemID(id_to_remove);
|
||||
//// [SL:KB] - Patch: Appearance-Misc | Checked: 2015-05-05 (Catznip-3.7)
|
||||
// removeCOFItemLinks(linked_item_id, cb, immediate_delete);
|
||||
//// [/SL:KB]
|
||||
//// removeCOFItemLinks(linked_item_id, cb);
|
||||
// addDoomedTempAttachment(linked_item_id);
|
||||
// }
|
||||
}
|
||||
|
||||
//void LLAppearanceMgr::removeItemFromAvatar(const LLUUID& id_to_remove)
|
||||
|
|
|
|||
|
|
@ -54,6 +54,11 @@ public:
|
|||
bool enforce_ordering = true,
|
||||
nullary_func_t post_update_func = no_op);
|
||||
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, LLPointer<LLInventoryCallback> link_waiter = 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);
|
||||
|
|
@ -273,6 +278,7 @@ private:
|
|||
|
||||
static void onOutfitRename(const LLSD& notification, const LLSD& response);
|
||||
|
||||
|
||||
bool mAttachmentInvLinkEnabled;
|
||||
bool mOutfitIsDirty;
|
||||
bool mIsInUpdateAppearanceFromCOF; // to detect recursive calls.
|
||||
|
|
|
|||
|
|
@ -95,6 +95,11 @@
|
|||
// [SL:KB] - Patch: Appearance-Misc | Checked: 2013-02-12 (Catznip-3.4)
|
||||
#include "llappearancemgr.h"
|
||||
// [/SL:KB]
|
||||
// [RLVa:KB] - Checked: 2010-05-03 (RLVa-1.2.0g)
|
||||
#include "rlvactions.h"
|
||||
#include "rlvhandler.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
#include "llweb.h"
|
||||
#include "llupdaterservice.h"
|
||||
#include "llfloatertexturefetchdebugger.h"
|
||||
|
|
@ -485,7 +490,11 @@ void idle_afk_check()
|
|||
{
|
||||
// check idle timers
|
||||
F32 current_idle = gAwayTriggerTimer.getElapsedTimeF32();
|
||||
F32 afk_timeout = gSavedSettings.getS32("AFKTimeout");
|
||||
// [RLVa:KB] - Checked: 2010-05-03 (RLVa-1.2.0g) | Modified: RLVa-1.2.0g
|
||||
// Enforce an idle time of 30 minutes if @allowidle=n restricted
|
||||
F32 afk_timeout = (!gRlvHandler.hasBehaviour(RLV_BHVR_ALLOWIDLE)) ? gSavedSettings.getS32("AFKTimeout") : 60 * 30;
|
||||
// [/RLVa:KB]
|
||||
// F32 afk_timeout = gSavedSettings.getS32("AFKTimeout");
|
||||
if (afk_timeout && (current_idle > afk_timeout) && ! gAgent.getAFK())
|
||||
{
|
||||
LL_INFOS("IdleAway") << "Idle more than " << afk_timeout << " seconds: automatically changing to Away status" << LL_ENDL;
|
||||
|
|
@ -3305,16 +3314,28 @@ LLSD LLAppViewer::getViewerInfo() const
|
|||
LLViewerRegion* region = gAgent.getRegion();
|
||||
if (region)
|
||||
{
|
||||
LLVector3d pos = gAgent.getPositionGlobal();
|
||||
info["POSITION"] = ll_sd_from_vector3d(pos);
|
||||
info["POSITION_LOCAL"] = ll_sd_from_vector3(gAgent.getPosAgentFromGlobal(pos));
|
||||
info["REGION"] = gAgent.getRegion()->getName();
|
||||
info["HOSTNAME"] = gAgent.getRegion()->getHost().getHostName();
|
||||
info["HOSTIP"] = gAgent.getRegion()->getHost().getString();
|
||||
// [RLVa:KB] - Checked: 2014-02-24 (RLVa-1.4.10)
|
||||
if (RlvActions::canShowLocation())
|
||||
{
|
||||
// [/RLVa:KB]
|
||||
LLVector3d pos = gAgent.getPositionGlobal();
|
||||
info["POSITION"] = ll_sd_from_vector3d(pos);
|
||||
info["POSITION_LOCAL"] = ll_sd_from_vector3(gAgent.getPosAgentFromGlobal(pos));
|
||||
info["REGION"] = gAgent.getRegion()->getName();
|
||||
info["HOSTNAME"] = gAgent.getRegion()->getHost().getHostName();
|
||||
info["HOSTIP"] = gAgent.getRegion()->getHost().getString();
|
||||
// info["SERVER_VERSION"] = gLastVersionChannel;
|
||||
LLSLURL slurl;
|
||||
LLAgentUI::buildSLURL(slurl);
|
||||
info["SLURL"] = slurl.getSLURLString();
|
||||
// [RLVa:KB] - Checked: 2014-02-24 (RLVa-1.4.10)
|
||||
}
|
||||
else
|
||||
{
|
||||
info["REGION"] = RlvStrings::getString(RLV_STRING_HIDDEN_REGION);
|
||||
}
|
||||
info["SERVER_VERSION"] = gLastVersionChannel;
|
||||
LLSLURL slurl;
|
||||
LLAgentUI::buildSLURL(slurl);
|
||||
info["SLURL"] = slurl.getSLURLString();
|
||||
// [/RLVa:KB]
|
||||
}
|
||||
|
||||
// CPU
|
||||
|
|
@ -3333,6 +3354,9 @@ LLSD LLAppViewer::getViewerInfo() const
|
|||
}
|
||||
#endif
|
||||
|
||||
// [RLVa:KB] - Checked: 2010-04-18 (RLVa-1.2.0)
|
||||
info["RLV_VERSION"] = (rlv_handler_t::isEnabled()) ? RlvStrings::getVersionAbout() : "(disabled)";
|
||||
// [/RLVa:KB]
|
||||
info["OPENGL_VERSION"] = (const char*)(glGetString(GL_VERSION));
|
||||
|
||||
info["J2C_VERSION"] = LLImageJ2C::getEngineInfo();
|
||||
|
|
@ -3433,7 +3457,10 @@ std::string LLAppViewer::getViewerInfoString() const
|
|||
}
|
||||
if (info.has("REGION"))
|
||||
{
|
||||
support << "\n\n" << LLTrans::getString("AboutPosition", args);
|
||||
// [RLVa:KB] - Checked: 2014-02-24 (RLVa-1.4.10)
|
||||
support << "\n\n" << LLTrans::getString( (RlvActions::canShowLocation()) ? "AboutPosition" : "AboutPositionRLVShowLoc", args);
|
||||
// [/RLVa:KB]
|
||||
// support << "\n\n" << LLTrans::getString("AboutPosition", args);
|
||||
}
|
||||
support << "\n\n" << LLTrans::getString("AboutSystem", args);
|
||||
support << "\n";
|
||||
|
|
|
|||
|
|
@ -35,6 +35,10 @@
|
|||
#include "llviewerinventory.h"
|
||||
#include "llviewerregion.h"
|
||||
#include "message.h"
|
||||
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1a)
|
||||
#include "rlvhandler.h"
|
||||
#include "rlvlocks.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
const F32 COF_LINK_BATCH_TIME = 5.0F;
|
||||
const F32 MAX_ATTACHMENT_REQUEST_LIFETIME = 30.0F;
|
||||
|
|
@ -72,9 +76,14 @@ LLAttachmentsMgr::~LLAttachmentsMgr()
|
|||
{
|
||||
}
|
||||
|
||||
//void LLAttachmentsMgr::addAttachmentRequest(const LLUUID& item_id,
|
||||
// const U8 attachment_pt,
|
||||
// const BOOL add)
|
||||
// [RLVa:KB] - Checked: 2010-09-13 (RLVa-1.2.1)
|
||||
void LLAttachmentsMgr::addAttachmentRequest(const LLUUID& item_id,
|
||||
const U8 attachment_pt,
|
||||
const BOOL add)
|
||||
const BOOL add, const BOOL fRlvForce /*=FALSE*/)
|
||||
// [/RLVa:KB]
|
||||
{
|
||||
LLViewerInventoryItem *item = gInventory.getItem(item_id);
|
||||
|
||||
|
|
@ -92,6 +101,26 @@ void LLAttachmentsMgr::addAttachmentRequest(const LLUUID& item_id,
|
|||
attachment.mItemID = item_id;
|
||||
attachment.mAttachmentPt = attachment_pt;
|
||||
attachment.mAdd = add;
|
||||
|
||||
// [RLVa:KB] - Checked: 2010-09-23 (RLVa-1.2.1)
|
||||
if ( (rlv_handler_t::isEnabled()) && (!fRlvForce) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_ANY)) && (gAgentWearables.areInitialAttachmentsRequested()) )
|
||||
{
|
||||
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);
|
||||
|
||||
mAttachmentRequests.addTime(item_id);
|
||||
|
|
|
|||
|
|
@ -75,9 +75,14 @@ public:
|
|||
LLAttachmentsMgr();
|
||||
virtual ~LLAttachmentsMgr();
|
||||
|
||||
// [RLVa:KB] - Checked: 2010-09-13 (RLVa-1.2.1)
|
||||
void addAttachmentRequest(const LLUUID& item_id,
|
||||
const U8 attachment_pt,
|
||||
const BOOL add);
|
||||
const BOOL add, const BOOL fRlvForce = FALSE);
|
||||
// [/RLVa:KB]
|
||||
// void addAttachmentRequest(const LLUUID& item_id,
|
||||
// const U8 attachment_pt,
|
||||
// const BOOL add);
|
||||
void onAttachmentRequested(const LLUUID& item_id);
|
||||
void requestAttachments(attachments_vec_t& attachment_requests);
|
||||
static void onIdle(void *);
|
||||
|
|
|
|||
|
|
@ -74,6 +74,10 @@
|
|||
#include "llsidepanelinventory.h"
|
||||
#include "llavatarname.h"
|
||||
#include "llagentui.h"
|
||||
// [RLVa:KB] - Checked: 2011-04-11 (RLVa-1.3.0)
|
||||
#include "rlvactions.h"
|
||||
#include "rlvcommon.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
// Flags for kick message
|
||||
const U32 KICK_FLAGS_DEFAULT = 0x0;
|
||||
|
|
@ -203,6 +207,15 @@ void LLAvatarActions::startIM(const LLUUID& id)
|
|||
if (id.isNull() || gAgent.getID() == id)
|
||||
return;
|
||||
|
||||
// [RLVa:KB] - Checked: 2013-05-09 (RLVa-1.4.9)
|
||||
if (!RlvActions::canStartIM(id))
|
||||
{
|
||||
make_ui_sound("UISndInvalidOp");
|
||||
RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_STARTIM, LLSD().with("RECIPIENT", LLSLURL("agent", id, "completename").getSLURLString()));
|
||||
return;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
LLAvatarNameCache::get(id, boost::bind(&on_avatar_name_cache_start_im, _1, _2));
|
||||
}
|
||||
|
||||
|
|
@ -238,6 +251,16 @@ void LLAvatarActions::startCall(const LLUUID& id)
|
|||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// [RLVa:KB] - Checked: 2013-05-09 (RLVa-1.4.9)
|
||||
if (!RlvActions::canStartIM(id))
|
||||
{
|
||||
make_ui_sound("UISndInvalidOp");
|
||||
RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_STARTIM, LLSD().with("RECIPIENT", LLSLURL("agent", id, "completename").getSLURLString()));
|
||||
return;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
LLAvatarNameCache::get(id, boost::bind(&on_avatar_name_cache_start_call, _1, _2));
|
||||
}
|
||||
|
||||
|
|
@ -254,7 +277,17 @@ void LLAvatarActions::startAdhocCall(const uuid_vec_t& ids, const LLUUID& floate
|
|||
id_array.reserve(ids.size());
|
||||
for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it)
|
||||
{
|
||||
id_array.push_back(*it);
|
||||
// [RLVa:KB] - Checked: 2011-04-11 (RLVa-1.3.0)
|
||||
const LLUUID& idAgent = *it;
|
||||
if (!RlvActions::canStartIM(idAgent))
|
||||
{
|
||||
make_ui_sound("UISndInvalidOp");
|
||||
RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_STARTCONF);
|
||||
return;
|
||||
}
|
||||
id_array.push_back(idAgent);
|
||||
// [/RLVa:KB]
|
||||
// id_array.push_back(*it);
|
||||
}
|
||||
|
||||
// create the new ad hoc voice session
|
||||
|
|
@ -301,7 +334,17 @@ void LLAvatarActions::startConference(const uuid_vec_t& ids, const LLUUID& float
|
|||
id_array.reserve(ids.size());
|
||||
for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it)
|
||||
{
|
||||
id_array.push_back(*it);
|
||||
// [RLVa:KB] - Checked: 2011-04-11 (RLVa-1.3.0)
|
||||
const LLUUID& idAgent = *it;
|
||||
if (!RlvActions::canStartIM(idAgent))
|
||||
{
|
||||
make_ui_sound("UISndInvalidOp");
|
||||
RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_STARTCONF);
|
||||
return;
|
||||
}
|
||||
id_array.push_back(idAgent);
|
||||
// [/RLVa:KB]
|
||||
// id_array.push_back(*it);
|
||||
}
|
||||
const std::string title = LLTrans::getString("conference-title");
|
||||
LLUUID session_id = gIMMgr->addSession(title, IM_SESSION_CONFERENCE_START, ids[0], id_array, false, floater_id);
|
||||
|
|
@ -417,6 +460,17 @@ void LLAvatarActions::teleport_request_callback(const LLSD& notification, const
|
|||
{
|
||||
LLMessageSystem* msg = gMessageSystem;
|
||||
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.0
|
||||
const LLUUID idRecipient = notification["substitutions"]["uuid"];
|
||||
std::string strMessage = response["message"];
|
||||
|
||||
// Filter the request message if the recipients is IM-blocked
|
||||
if ( (RlvActions::isRlvEnabled()) && ((!RlvActions::canStartIM(idRecipient)) || (!RlvActions::canSendIM(idRecipient))) )
|
||||
{
|
||||
strMessage = RlvStrings::getString(RLV_STRING_HIDDEN);
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
msg->newMessageFast(_PREHASH_ImprovedInstantMessage);
|
||||
msg->nextBlockFast(_PREHASH_AgentData);
|
||||
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
|
||||
|
|
@ -434,7 +488,10 @@ void LLAvatarActions::teleport_request_callback(const LLSD& notification, const
|
|||
LLAgentUI::buildFullname(name);
|
||||
|
||||
msg->addStringFast(_PREHASH_FromAgentName, name);
|
||||
msg->addStringFast(_PREHASH_Message, response["message"]);
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.0
|
||||
msg->addStringFast(_PREHASH_Message, strMessage);
|
||||
// [/RLVa:KB]
|
||||
// msg->addStringFast(_PREHASH_Message, response["message"]);
|
||||
msg->addU32Fast(_PREHASH_ParentEstateID, 0);
|
||||
msg->addUUIDFast(_PREHASH_RegionID, LLUUID::null);
|
||||
msg->addVector3Fast(_PREHASH_Position, gAgent.getPositionAgent());
|
||||
|
|
@ -453,14 +510,17 @@ void LLAvatarActions::teleportRequest(const LLUUID& id)
|
|||
{
|
||||
LLSD notification;
|
||||
notification["uuid"] = id;
|
||||
LLAvatarName av_name;
|
||||
if (!LLAvatarNameCache::get(id, &av_name))
|
||||
{
|
||||
// unlikely ... they just picked this name from somewhere...
|
||||
LLAvatarNameCache::get(id, boost::bind(&LLAvatarActions::teleportRequest, id));
|
||||
return; // reinvoke this when the name resolves
|
||||
}
|
||||
notification["NAME"] = av_name.getCompleteName();
|
||||
// [RLVa:KB] - Checked: RLVa-1.5.0
|
||||
notification["NAME"] = LLSLURL("agent", id, (RlvActions::canShowName(RlvActions::SNC_TELEPORTREQUEST, id)) ? "completename" : "rlvanonym").getSLURLString();
|
||||
// [/RLVa:KB]
|
||||
// LLAvatarName av_name;
|
||||
// if (!LLAvatarNameCache::get(id, &av_name))
|
||||
// {
|
||||
// // unlikely ... they just picked this name from somewhere...
|
||||
// LLAvatarNameCache::get(id, boost::bind(&LLAvatarActions::teleportRequest, id));
|
||||
// return; // reinvoke this when the name resolves
|
||||
// }
|
||||
// notification["NAME"] = av_name.getCompleteName();
|
||||
|
||||
LLSD payload;
|
||||
|
||||
|
|
|
|||
|
|
@ -330,3 +330,13 @@ void LLAvatarIconCtrl::onAvatarNameCache(const LLUUID& agent_id, const LLAvatarN
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// [SL:KB] - Checked: 2010-11-01 (RLVa-1.2.2a) | Added: RLVa-1.2.2a
|
||||
BOOL LLAvatarIconCtrl::handleToolTip(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
// Don't show our tooltip if we were asked not to
|
||||
if (!mDrawTooltip)
|
||||
return FALSE;
|
||||
return LLIconCtrl::handleToolTip(x, y, mask);
|
||||
}
|
||||
// [/SL:KB]
|
||||
|
|
|
|||
|
|
@ -109,6 +109,10 @@ protected:
|
|||
public:
|
||||
virtual ~LLAvatarIconCtrl();
|
||||
|
||||
// [SL:KB] - Checked: 2010-11-01 (RLVa-1.2.2a) | Added: RLVa-1.2.2a
|
||||
/*virtual*/ BOOL handleToolTip(S32 x, S32 y, MASK mask);
|
||||
// [/SL:KB]
|
||||
|
||||
virtual void setValue(const LLSD& value);
|
||||
|
||||
// LLAvatarPropertiesProcessor observer trigger
|
||||
|
|
|
|||
|
|
@ -141,6 +141,9 @@ LLAvatarList::LLAvatarList(const Params& p)
|
|||
, mShowSpeakingIndicator(p.show_speaking_indicator)
|
||||
, mShowPermissions(p.show_permissions_granted)
|
||||
, mShowCompleteName(false)
|
||||
// [RLVa:KB] - Checked: RLVa-1.2.0
|
||||
, mRlvCheckShowNames(false)
|
||||
// [/RLVa:KB]
|
||||
{
|
||||
setCommitOnSelectionChange(true);
|
||||
|
||||
|
|
@ -207,6 +210,10 @@ void LLAvatarList::draw()
|
|||
void LLAvatarList::clear()
|
||||
{
|
||||
getIDs().clear();
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.3
|
||||
// We need to be able to call this *somehow* and it actually makes moderate sense to call this in here
|
||||
updateNoItemsMessage(mNameFilter);
|
||||
// [/RLVa:KB]
|
||||
setDirty(true);
|
||||
LLFlatListViewEx::clear();
|
||||
}
|
||||
|
|
@ -442,6 +449,9 @@ void LLAvatarList::addNewItem(const LLUUID& id, const std::string& name, BOOL is
|
|||
{
|
||||
LLAvatarListItem* item = new LLAvatarListItem();
|
||||
item->setShowCompleteName(mShowCompleteName);
|
||||
// [RLVa:KB] - Checked: RLVa-1.2.0
|
||||
item->setRlvCheckShowNames(mRlvCheckShowNames);
|
||||
// [/RLVa:KB]
|
||||
// This sets the name as a side effect
|
||||
item->setAvatarId(id, mSessionID, mIgnoreOnlineStatus);
|
||||
item->setOnline(mIgnoreOnlineStatus ? true : is_online);
|
||||
|
|
|
|||
|
|
@ -92,6 +92,12 @@ public:
|
|||
// Return true if filter has at least one match.
|
||||
bool filterHasMatches();
|
||||
|
||||
// [RLVa:KB] - Checked: RLVa-1.2.0
|
||||
void setRlvCheckShowNames(bool fRlvCheckShowNames) { mRlvCheckShowNames = fRlvCheckShowNames; }
|
||||
// We need this to be public since we call it from RlvUIEnabler::onToggleShowNames()
|
||||
void updateAvatarNames();
|
||||
// [/RLVa:KB]
|
||||
|
||||
boost::signals2::connection setRefreshCompleteCallback(const commit_signal_t::slot_type& cb);
|
||||
|
||||
boost::signals2::connection setItemDoubleClickCallback(const mouse_signal_t::slot_type& cb);
|
||||
|
|
@ -114,7 +120,7 @@ protected:
|
|||
void updateLastInteractionTimes();
|
||||
void rebuildNames();
|
||||
void onItemDoubleClicked(LLUICtrl* ctrl, S32 x, S32 y, MASK mask);
|
||||
void updateAvatarNames();
|
||||
// void updateAvatarNames();
|
||||
|
||||
private:
|
||||
|
||||
|
|
@ -130,6 +136,9 @@ private:
|
|||
bool mShowSpeakingIndicator;
|
||||
bool mShowPermissions;
|
||||
bool mShowCompleteName;
|
||||
// [RLVa:KB] - RLVa-1.2.0
|
||||
bool mRlvCheckShowNames;
|
||||
// [/RLVa:KB]
|
||||
|
||||
LLTimer* mLITUpdateTimer; // last interaction time update timer
|
||||
std::string mIconParamName;
|
||||
|
|
|
|||
|
|
@ -41,6 +41,10 @@
|
|||
#include "llavatariconctrl.h"
|
||||
#include "lloutputmonitorctrl.h"
|
||||
#include "lltooldraganddrop.h"
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.1
|
||||
#include "rlvactions.h"
|
||||
#include "rlvcommon.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
bool LLAvatarListItem::sStaticInitialized = false;
|
||||
S32 LLAvatarListItem::sLeftPadding = 0;
|
||||
|
|
@ -76,6 +80,9 @@ LLAvatarListItem::LLAvatarListItem(bool not_from_ui_factory/* = true*/)
|
|||
mOnlineStatus(E_UNKNOWN),
|
||||
mShowInfoBtn(true),
|
||||
mShowProfileBtn(true),
|
||||
// [RLVa:KB] - Checked: RLVa-1.2.0
|
||||
mRlvCheckShowNames(false),
|
||||
// [/RLVa:KB]
|
||||
mShowPermissions(false),
|
||||
mShowCompleteName(false),
|
||||
mHovered(false),
|
||||
|
|
@ -179,8 +186,13 @@ 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: RLVa-1.2.0
|
||||
bool fRlvCanShowName = (!mRlvCheckShowNames) || (RlvActions::canShowName(RlvActions::SNC_DEFAULT, mAvatarId));
|
||||
mInfoBtn->setVisible( (mShowInfoBtn) && (fRlvCanShowName) );
|
||||
mProfileBtn->setVisible( (mShowProfileBtn) && (fRlvCanShowName) );
|
||||
// [/RLVa:KB]
|
||||
|
||||
mHovered = true;
|
||||
LLPanel::onMouseEnter(x, y, mask);
|
||||
|
|
@ -357,12 +369,18 @@ void LLAvatarListItem::onProfileBtnClick()
|
|||
|
||||
BOOL LLAvatarListItem::handleDoubleClick(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
if(mInfoBtn->getRect().pointInRect(x, y))
|
||||
// if(mInfoBtn->getRect().pointInRect(x, y))
|
||||
// [RVLa:KB] - Checked: RLVa-1.2.2
|
||||
if ( (mInfoBtn->getVisible()) && (mInfoBtn->getEnabled()) && (mInfoBtn->getRect().pointInRect(x, y)) )
|
||||
// [/SL:KB]
|
||||
{
|
||||
onInfoBtnClick();
|
||||
return TRUE;
|
||||
}
|
||||
if(mProfileBtn->getRect().pointInRect(x, y))
|
||||
// if(mProfileBtn->getRect().pointInRect(x, y))
|
||||
// [RLVa:KB] - Checked: RLVa-1.2.2
|
||||
if ( (mProfileBtn->getVisible()) && (mProfileBtn->getEnabled()) && (mProfileBtn->getRect().pointInRect(x, y)) )
|
||||
// [/SL:KB]
|
||||
{
|
||||
onProfileBtnClick();
|
||||
return TRUE;
|
||||
|
|
@ -422,8 +440,16 @@ void LLAvatarListItem::onAvatarNameCache(const LLAvatarName& av_name)
|
|||
mGreyOutUsername = "[ " + av_name.getUserName(true) + " ]";
|
||||
LLStringUtil::toLower(mGreyOutUsername);
|
||||
}
|
||||
setAvatarName(name_string);
|
||||
setAvatarToolTip(av_name.getUserName());
|
||||
// setAvatarName(name_string);
|
||||
// setAvatarToolTip(av_name.getUserName());
|
||||
// [RLVa:KB] - Checked: RLVa-1.2.2
|
||||
bool fRlvCanShowName = (!mRlvCheckShowNames) || (RlvActions::canShowName(RlvActions::SNC_DEFAULT, mAvatarId));
|
||||
|
||||
setAvatarName( (fRlvCanShowName) ? name_string : RlvStrings::getAnonym(av_name) );
|
||||
setAvatarToolTip( (fRlvCanShowName) ? av_name.getUserName() : RlvStrings::getAnonym(av_name) );
|
||||
// TODO-RLVa: bit of a hack putting this here. Maybe find a better way?
|
||||
mAvatarIcon->setDrawTooltip(fRlvCanShowName);
|
||||
// [/RLVa:KB]
|
||||
|
||||
//requesting the list to resort
|
||||
notifyParent(LLSD().with("sort", LLSD()));
|
||||
|
|
|
|||
|
|
@ -107,6 +107,9 @@ public:
|
|||
void showLastInteractionTime(bool show);
|
||||
void setAvatarIconVisible(bool visible);
|
||||
void setShowCompleteName(bool show) { mShowCompleteName = show;};
|
||||
// [RLVa:KB] - Checked: RLVa-1.2.0
|
||||
void setRlvCheckShowNames(bool fRlvCheckShowNames) { mRlvCheckShowNames = fRlvCheckShowNames; }
|
||||
// [/RLVa:KB]
|
||||
|
||||
const LLUUID& getAvatarId() const;
|
||||
std::string getAvatarName() const;
|
||||
|
|
@ -212,6 +215,9 @@ private:
|
|||
//Speaker indicator and avatar name coords are translated accordingly
|
||||
bool mShowInfoBtn;
|
||||
bool mShowProfileBtn;
|
||||
// [RLVa:KB] - Checked: RLVa-1.2.0
|
||||
bool mRlvCheckShowNames;
|
||||
// [/RLVa:KB]
|
||||
|
||||
/// indicates whether to show icons representing permissions granted
|
||||
bool mShowPermissions;
|
||||
|
|
|
|||
|
|
@ -59,6 +59,9 @@
|
|||
#include "llui.h"
|
||||
#include "llviewermenu.h"
|
||||
#include "lluictrlfactory.h"
|
||||
// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0b)
|
||||
#include "rlvhandler.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
//
|
||||
// Globals
|
||||
|
|
@ -78,7 +81,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-0.2.2)
|
||||
extern void send_chat_from_viewer(std::string utf8_out_text, EChatType type, S32 channel);
|
||||
// [/RLVa:KB]
|
||||
|
||||
//
|
||||
// Functions
|
||||
|
|
@ -471,7 +477,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();
|
||||
}
|
||||
|
|
@ -583,6 +593,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))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -62,6 +62,9 @@
|
|||
#include "llviewercontrol.h"
|
||||
#include "llviewerobjectlist.h"
|
||||
#include "llmutelist.h"
|
||||
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f)
|
||||
#include "rlvcommon.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
static LLDefaultChildRegistry::Register<LLChatHistory> r("chat_history");
|
||||
|
||||
|
|
@ -93,6 +96,10 @@ public:
|
|||
LLSD payload;
|
||||
payload["object_id"] = object_id;
|
||||
payload["owner_id"] = query_map["owner"];
|
||||
// [RLVa:KB] - Checked: 2010-11-02 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
|
||||
if (query_map.has("rlv_shownames"))
|
||||
payload["rlv_shownames"] = query_map["rlv_shownames"];
|
||||
// [/RLVa:KB]
|
||||
payload["name"] = query_map["name"];
|
||||
payload["slurl"] = LLWeb::escapeURL(query_map["slurl"]);
|
||||
payload["group_owned"] = query_map["groupowned"];
|
||||
|
|
@ -108,6 +115,10 @@ public:
|
|||
LLChatHistoryHeader()
|
||||
: LLPanel(),
|
||||
mInfoCtrl(NULL),
|
||||
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.2a) | Added: RLVa-1.2.0f
|
||||
mShowContextMenu(true),
|
||||
mShowInfoCtrl(true),
|
||||
// [/RLVa:KB]
|
||||
mPopupMenuHandleAvatar(),
|
||||
mPopupMenuHandleObject(),
|
||||
mAvatarID(),
|
||||
|
|
@ -348,7 +359,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.2a) | 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)
|
||||
{
|
||||
|
|
@ -412,8 +427,24 @@ public:
|
|||
|
||||
// Start with blank so sample data from XUI XML doesn't
|
||||
// flash on the screen
|
||||
user_name->setValue( LLSD() );
|
||||
fetchAvatarName();
|
||||
// user_name->setValue( LLSD() );
|
||||
// fetchAvatarName();
|
||||
// [RLVa:KB] - Checked: 2010-11-01 (RLVa-1.2.2a) | Added: RLVa-1.2.2a
|
||||
if (!chat.mRlvNamesFiltered)
|
||||
{
|
||||
user_name->setValue( LLSD() );
|
||||
fetchAvatarName();
|
||||
}
|
||||
else
|
||||
{
|
||||
// If the agent's chat was subject to @shownames=n we should display their anonimized name
|
||||
mFrom = chat.mFromName;
|
||||
user_name->setValue(mFrom);
|
||||
user_name->setToolTip(mFrom);
|
||||
setToolTip(mFrom);
|
||||
updateMinUserNameWidth();
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
}
|
||||
else if (chat.mChatStyle == CHAT_STYLE_HISTORY ||
|
||||
mSourceType == CHAT_SOURCE_AGENT)
|
||||
|
|
@ -465,6 +496,15 @@ public:
|
|||
if(mSourceType != CHAT_SOURCE_AGENT || mAvatarID.isNull())
|
||||
icon->setDrawTooltip(false);
|
||||
|
||||
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.2a) | 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:
|
||||
|
|
@ -541,6 +581,10 @@ protected:
|
|||
|
||||
void showContextMenu(S32 x,S32 y)
|
||||
{
|
||||
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.2a) | 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)
|
||||
|
|
@ -615,7 +659,10 @@ protected:
|
|||
|
||||
void showInfoCtrl()
|
||||
{
|
||||
const bool isVisible = !mAvatarID.isNull() && !mFrom.empty() && CHAT_SOURCE_SYSTEM != mSourceType;
|
||||
// const bool isVisible = !mAvatarID.isNull() && !mFrom.empty() && CHAT_SOURCE_SYSTEM != mSourceType;
|
||||
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.2a) | Added: RLVa-1.2.0f
|
||||
const bool isVisible = mShowInfoCtrl && !mAvatarID.isNull() && !mFrom.empty() && CHAT_SOURCE_SYSTEM != mSourceType;
|
||||
// [/RLVa:KB]
|
||||
if (isVisible)
|
||||
{
|
||||
const LLRect sticky_rect = mUserNameTextBox->getRect();
|
||||
|
|
@ -705,6 +752,10 @@ protected:
|
|||
EChatSourceType mSourceType;
|
||||
std::string mFrom;
|
||||
LLUUID mSessionID;
|
||||
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.2a) | Added: RLVa-1.2.0f
|
||||
bool mShowContextMenu;
|
||||
bool mShowInfoCtrl;
|
||||
// [/RLVa:KB]
|
||||
|
||||
S32 mMinUserNameWidth;
|
||||
const LLFontGL* mUserNameFont;
|
||||
|
|
@ -989,8 +1040,18 @@ 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 = LLViewerChat::getSenderSLURL(chat, args);
|
||||
// [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")) )
|
||||
{
|
||||
// [/RLVa:KB]
|
||||
// for object IMs, create a secondlife:///app/objectim SLapp
|
||||
/*std::string*/ url = LLViewerChat::getSenderSLURL(chat, args);
|
||||
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
|
||||
}
|
||||
// [/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)
|
||||
|
|
@ -1004,7 +1065,10 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
|
|||
mEditor->appendText(chat.mFromName + delimiter, prependNewLineState, link_params);
|
||||
prependNewLineState = false;
|
||||
}
|
||||
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(body_message_params);
|
||||
link_params.overwriteFrom(LLStyleMap::instance().lookupAgent(chat.mFromID));
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
@ -182,7 +186,11 @@ void LLFloaterIMNearbyChatToastPanel::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;
|
||||
|
||||
|
|
@ -228,8 +236,15 @@ void LLFloaterIMNearbyChatToastPanel::init(LLSD& notification)
|
|||
style_params_name.font.name(font_name);
|
||||
style_params_name.font.size(font_style_size);
|
||||
|
||||
style_params_name.link_href = notification["sender_slurl"].asString();
|
||||
style_params_name.is_link = true;
|
||||
// style_params_name.link_href = notification["sender_slurl"].asString();
|
||||
// style_params_name.is_link = true;
|
||||
// [RLVa:KB] - Checked: 2011-12-13 (RLVa-1.4.6) | Added: RLVa-1.4.6
|
||||
if (notification.has("sender_slurl"))
|
||||
{
|
||||
style_params_name.link_href = notification["sender_slurl"].asString();
|
||||
style_params_name.is_link = true;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
mMsgText->appendText(str_sender, FALSE, style_params_name);
|
||||
|
||||
|
|
@ -365,7 +380,10 @@ void LLFloaterIMNearbyChatToastPanel::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)
|
||||
|
|
|
|||
|
|
@ -47,6 +47,9 @@ protected:
|
|||
LLFloaterIMNearbyChatToastPanel()
|
||||
:
|
||||
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:
|
||||
|
|
@ -91,6 +94,9 @@ private:
|
|||
|
||||
|
||||
bool mIsDirty;
|
||||
// [RLVa:KB] - Checked: 2010-04-200 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
|
||||
bool mShowIconTooltip;
|
||||
// [/RLVa:KB]
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -36,6 +36,9 @@
|
|||
#include "llsingleton.h"
|
||||
#include "llsyswellwindow.h"
|
||||
#include "llfloaternotificationstabbed.h"
|
||||
// [SL:KB] - Patch: UI-Notifications | Checked: 2013-05-09 (Catznip-3.5)
|
||||
#include "llchannelmanager.h"
|
||||
// [/SL:KB]
|
||||
|
||||
static LLDefaultChildRegistry::Register<LLChicletPanel> t1("chiclet_panel");
|
||||
static LLDefaultChildRegistry::Register<LLNotificationChiclet> t2("chiclet_notification");
|
||||
|
|
@ -237,6 +240,15 @@ bool LLNotificationChiclet::ChicletNotificationChannel::filterNotification( LLNo
|
|||
{
|
||||
displayNotification = true;
|
||||
}
|
||||
// [SL:KB] - Patch: UI-Notifications | Checked: 2013-05-09 (Catznip-3.5)
|
||||
else if ("offer" == notification->getType())
|
||||
{
|
||||
// Assume that any offer notification with "getCanBeStored() == true" is the result of RLVa routing it to the notifcation syswell
|
||||
/*const*/ LLNotificationsUI::LLScreenChannel* pChannel = LLNotificationsUI::LLChannelManager::instance().getNotificationScreenChannel();
|
||||
/*const*/ LLNotificationsUI::LLToast* pToast = (pChannel) ? pChannel->getToastByNotificationID(notification->getID()) : NULL;
|
||||
displayNotification = (pToast) && (pToast->getCanBeStored());
|
||||
}
|
||||
// [/SL:KB]
|
||||
else
|
||||
{
|
||||
displayNotification = false;
|
||||
|
|
|
|||
|
|
@ -30,6 +30,10 @@
|
|||
|
||||
#include "lldiriterator.h"
|
||||
|
||||
// [RLVa:KB] - Checked: 2011-09-04 (RLVa-1.4.1a) | Added: RLVa-1.4.1a
|
||||
#include <boost/algorithm/string.hpp>
|
||||
// [/RLVa:KB]
|
||||
|
||||
void LLDayCycleManager::getPresetNames(preset_name_list_t& names) const
|
||||
{
|
||||
names.clear();
|
||||
|
|
@ -60,6 +64,18 @@ void LLDayCycleManager::getPresetNames(preset_name_list_t& user, preset_name_lis
|
|||
}
|
||||
}
|
||||
|
||||
// [RLVa:KB] - Checked: 2011-09-04 (RLVa-1.4.1a) | Added: RLVa-1.4.1a
|
||||
const std::string& LLDayCycleManager::findPreset(const std::string& strPresetName)
|
||||
{
|
||||
for (dc_map_t::const_iterator itCycle = mDayCycleMap.begin(); itCycle != mDayCycleMap.end(); ++itCycle)
|
||||
{
|
||||
if (boost::iequals(itCycle->first, strPresetName))
|
||||
return itCycle->first;
|
||||
}
|
||||
return LLStringUtil::null;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
void LLDayCycleManager::getUserPresetNames(preset_name_list_t& user) const
|
||||
{
|
||||
preset_name_list_t sys; // unused
|
||||
|
|
|
|||
|
|
@ -51,6 +51,9 @@ public:
|
|||
void getPresetNames(preset_name_list_t& names) const;
|
||||
void getPresetNames(preset_name_list_t& user, preset_name_list_t& sys) const;
|
||||
void getUserPresetNames(preset_name_list_t& user) const;
|
||||
// [RLVa:KB] - Checked: 2011-09-04 (RLVa-1.4.1a) | Added: RLVa-1.4.1a
|
||||
const std::string& findPreset(const std::string& strPresetName);
|
||||
// [/RLVa:KB]
|
||||
|
||||
bool getPreset(const std::string name, LLWLDayCycle& day_cycle) const;
|
||||
bool getPreset(const std::string name, LLSD& day_cycle) const;
|
||||
|
|
|
|||
|
|
@ -308,10 +308,16 @@ void LLDrawPoolTerrain::renderFullShader()
|
|||
// Hack! Get the region that this draw pool is rendering from!
|
||||
LLViewerRegion *regionp = mDrawFace[0]->getDrawable()->getVObj()->getRegion();
|
||||
LLVLComposition *compp = regionp->getComposition();
|
||||
LLViewerTexture *detail_texture0p = compp->mDetailTextures[0];
|
||||
LLViewerTexture *detail_texture1p = compp->mDetailTextures[1];
|
||||
LLViewerTexture *detail_texture2p = compp->mDetailTextures[2];
|
||||
LLViewerTexture *detail_texture3p = compp->mDetailTextures[3];
|
||||
// [SL:KB] - Patch: Render-TextureToggle (Catznip-4.0)
|
||||
LLViewerTexture *detail_texture0p = (LLPipeline::sRenderTextures) ? compp->mDetailTextures[0] : LLViewerFetchedTexture::sDefaultDiffuseImagep;
|
||||
LLViewerTexture *detail_texture1p = (LLPipeline::sRenderTextures) ? compp->mDetailTextures[1] : LLViewerFetchedTexture::sDefaultDiffuseImagep;
|
||||
LLViewerTexture *detail_texture2p = (LLPipeline::sRenderTextures) ? compp->mDetailTextures[2] : LLViewerFetchedTexture::sDefaultDiffuseImagep;
|
||||
LLViewerTexture *detail_texture3p = (LLPipeline::sRenderTextures) ? compp->mDetailTextures[3] : LLViewerFetchedTexture::sDefaultDiffuseImagep;
|
||||
// [/SL:KB]
|
||||
// LLViewerTexture *detail_texture0p = compp->mDetailTextures[0];
|
||||
// LLViewerTexture *detail_texture1p = compp->mDetailTextures[1];
|
||||
// LLViewerTexture *detail_texture2p = compp->mDetailTextures[2];
|
||||
// LLViewerTexture *detail_texture3p = compp->mDetailTextures[3];
|
||||
|
||||
LLVector3d region_origin_global = gAgent.getRegion()->getOriginGlobal();
|
||||
F32 offset_x = (F32)fmod(region_origin_global.mdV[VX], 1.0/(F64)sDetailScale)*sDetailScale;
|
||||
|
|
@ -459,10 +465,16 @@ void LLDrawPoolTerrain::renderFull4TU()
|
|||
// Hack! Get the region that this draw pool is rendering from!
|
||||
LLViewerRegion *regionp = mDrawFace[0]->getDrawable()->getVObj()->getRegion();
|
||||
LLVLComposition *compp = regionp->getComposition();
|
||||
LLViewerTexture *detail_texture0p = compp->mDetailTextures[0];
|
||||
LLViewerTexture *detail_texture1p = compp->mDetailTextures[1];
|
||||
LLViewerTexture *detail_texture2p = compp->mDetailTextures[2];
|
||||
LLViewerTexture *detail_texture3p = compp->mDetailTextures[3];
|
||||
// [SL:KB] - Patch: Render-TextureToggle (Catznip-4.0)
|
||||
LLViewerTexture *detail_texture0p = (LLPipeline::sRenderTextures) ? compp->mDetailTextures[0] : LLViewerFetchedTexture::sDefaultDiffuseImagep;
|
||||
LLViewerTexture *detail_texture1p = (LLPipeline::sRenderTextures) ? compp->mDetailTextures[1] : LLViewerFetchedTexture::sDefaultDiffuseImagep;
|
||||
LLViewerTexture *detail_texture2p = (LLPipeline::sRenderTextures) ? compp->mDetailTextures[2] : LLViewerFetchedTexture::sDefaultDiffuseImagep;
|
||||
LLViewerTexture *detail_texture3p = (LLPipeline::sRenderTextures) ? compp->mDetailTextures[3] : LLViewerFetchedTexture::sDefaultDiffuseImagep;
|
||||
// [/SL:KB]
|
||||
// LLViewerTexture *detail_texture0p = compp->mDetailTextures[0];
|
||||
// LLViewerTexture *detail_texture1p = compp->mDetailTextures[1];
|
||||
// LLViewerTexture *detail_texture2p = compp->mDetailTextures[2];
|
||||
// LLViewerTexture *detail_texture3p = compp->mDetailTextures[3];
|
||||
|
||||
LLVector3d region_origin_global = gAgent.getRegion()->getOriginGlobal();
|
||||
F32 offset_x = (F32)fmod(region_origin_global.mdV[VX], 1.0/(F64)sDetailScale)*sDetailScale;
|
||||
|
|
@ -661,10 +673,16 @@ void LLDrawPoolTerrain::renderFull2TU()
|
|||
// Hack! Get the region that this draw pool is rendering from!
|
||||
LLViewerRegion *regionp = mDrawFace[0]->getDrawable()->getVObj()->getRegion();
|
||||
LLVLComposition *compp = regionp->getComposition();
|
||||
LLViewerTexture *detail_texture0p = compp->mDetailTextures[0];
|
||||
LLViewerTexture *detail_texture1p = compp->mDetailTextures[1];
|
||||
LLViewerTexture *detail_texture2p = compp->mDetailTextures[2];
|
||||
LLViewerTexture *detail_texture3p = compp->mDetailTextures[3];
|
||||
// [SL:KB] - Patch: Render-TextureToggle (Catznip-4.0)
|
||||
LLViewerTexture *detail_texture0p = (LLPipeline::sRenderTextures) ? compp->mDetailTextures[0] : LLViewerFetchedTexture::sDefaultDiffuseImagep;
|
||||
LLViewerTexture *detail_texture1p = (LLPipeline::sRenderTextures) ? compp->mDetailTextures[1] : LLViewerFetchedTexture::sDefaultDiffuseImagep;
|
||||
LLViewerTexture *detail_texture2p = (LLPipeline::sRenderTextures) ? compp->mDetailTextures[2] : LLViewerFetchedTexture::sDefaultDiffuseImagep;
|
||||
LLViewerTexture *detail_texture3p = (LLPipeline::sRenderTextures) ? compp->mDetailTextures[3] : LLViewerFetchedTexture::sDefaultDiffuseImagep;
|
||||
// [/SL:KB]
|
||||
// LLViewerTexture *detail_texture0p = compp->mDetailTextures[0];
|
||||
// LLViewerTexture *detail_texture1p = compp->mDetailTextures[1];
|
||||
// LLViewerTexture *detail_texture2p = compp->mDetailTextures[2];
|
||||
// LLViewerTexture *detail_texture3p = compp->mDetailTextures[3];
|
||||
|
||||
LLVector3d region_origin_global = gAgent.getRegion()->getOriginGlobal();
|
||||
F32 offset_x = (F32)fmod(region_origin_global.mdV[VX], 1.0/(F64)sDetailScale)*sDetailScale;
|
||||
|
|
|
|||
|
|
@ -98,7 +98,10 @@ void LLDrawPoolTree::render(S32 pass)
|
|||
LLGLState test(GL_ALPHA_TEST, LLGLSLShader::sNoFixedFunction ? 0 : 1);
|
||||
LLOverrideFaceColor color(this, 1.f, 1.f, 1.f, 1.f);
|
||||
|
||||
gGL.getTexUnit(sDiffTex)->bind(mTexturep);
|
||||
// [SL:KB] - Patch: Render-TextureToggle (Catznip-4.0)
|
||||
gGL.getTexUnit(sDiffTex)->bind( (LLPipeline::sRenderTextures) ? mTexturep : LLViewerFetchedTexture::sDefaultDiffuseImagep );
|
||||
// [/SL:KB]
|
||||
// gGL.getTexUnit(sDiffTex)->bind(mTexturep);
|
||||
|
||||
for (std::vector<LLFace*>::iterator iter = mDrawFace.begin();
|
||||
iter != mDrawFace.end(); iter++)
|
||||
|
|
|
|||
|
|
@ -35,6 +35,10 @@
|
|||
#include "llwaterparammanager.h"
|
||||
#include "llwlhandlers.h"
|
||||
#include "llwlparammanager.h"
|
||||
// [RLVa:KB] - Checked: 2011-09-04 (RLVa-1.4.1a) | Added: RLVa-1.4.1a
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include "rlvhandler.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
std::string LLEnvPrefs::getWaterPresetName() const
|
||||
{
|
||||
|
|
@ -479,7 +483,10 @@ void LLEnvManagerNew::onRegionSettingsResponse(const LLSD& content)
|
|||
LLWLParamManager::instance().refreshRegionPresets();
|
||||
|
||||
// If using server settings, update managers.
|
||||
if (getUseRegionSettings())
|
||||
// if (getUseRegionSettings())
|
||||
// [RLVa:KB] - Checked: 2011-08-29 (RLVa-1.4.1a) | Added: RLVa-1.4.1a
|
||||
if ( (getUseRegionSettings()) && (LLWLParamManager::getInstance()->mAnimator.getIsRunning()) )
|
||||
// [/RLVa:KB]
|
||||
{
|
||||
updateManagersFromPrefs(mInterpNextChangeMessage);
|
||||
}
|
||||
|
|
@ -590,6 +597,14 @@ void LLEnvManagerNew::updateWaterFromPrefs(bool interpolate)
|
|||
void LLEnvManagerNew::updateManagersFromPrefs(bool interpolate)
|
||||
{
|
||||
LL_DEBUGS("Windlight")<<LL_ENDL;
|
||||
|
||||
// [RLVa:KB] - Checked: 2011-09-04 (RLVa-1.4.1a) | Added: RLVa-1.4.1a
|
||||
if (gRlvHandler.hasBehaviour(RLV_BHVR_SETENV))
|
||||
{
|
||||
return;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
// Apply water settings.
|
||||
updateWaterFromPrefs(interpolate);
|
||||
|
||||
|
|
|
|||
|
|
@ -53,6 +53,9 @@
|
|||
#include "llviewershadermgr.h"
|
||||
#include "llviewertexture.h"
|
||||
#include "llvoavatar.h"
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.0
|
||||
#include "rlvhandler.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
#if LL_LINUX
|
||||
// Work-around spurious used before init warning on Vector4a
|
||||
|
|
@ -166,6 +169,10 @@ void LLFace::init(LLDrawable* drawablep, LLViewerObject* objp)
|
|||
mBoundingSphereRadius = 0.0f ;
|
||||
|
||||
mHasMedia = FALSE ;
|
||||
|
||||
// [SL:KB] - Patch: Render-TextureToggle (Catznip-4.0)
|
||||
mShowDiffTexture = true;
|
||||
// [/SL:KB]
|
||||
}
|
||||
|
||||
void LLFace::destroy()
|
||||
|
|
@ -282,6 +289,15 @@ void LLFace::setTexture(U32 ch, LLViewerTexture* tex)
|
|||
return ;
|
||||
}
|
||||
|
||||
// [SL:KB] - Patch: Render-TextureToggle (Catznip-4.0)
|
||||
if ( (LLRender::DIFFUSE_MAP == ch) && (!mShowDiffTexture) )
|
||||
{
|
||||
mOrigDiffTexture = tex;
|
||||
if (LLViewerFetchedTexture::sDefaultDiffuseImagep.get() == mTexture[ch].get())
|
||||
return;
|
||||
}
|
||||
// [/SL:KB]
|
||||
|
||||
if(mTexture[ch].notNull())
|
||||
{
|
||||
mTexture[ch]->removeFace(ch, this) ;
|
||||
|
|
@ -2644,9 +2660,60 @@ LLViewerTexture* LLFace::getTexture(U32 ch) const
|
|||
{
|
||||
llassert(ch < LLRender::NUM_TEXTURE_CHANNELS);
|
||||
|
||||
// [SL:KB] - Patch: Render-TextureToggle (Catznip-4.0)
|
||||
// Check whether the diffuse texture needs to be obscured or restored
|
||||
if (mShowDiffTexture != LLPipeline::sRenderTextures)
|
||||
setDefaultTexture(LLRender::DIFFUSE_MAP, !LLPipeline::sRenderTextures);
|
||||
// [/SL:KB]
|
||||
|
||||
return mTexture[ch] ;
|
||||
}
|
||||
|
||||
// [SL:KB] - Patch: Render-TextureToggle (Catznip-4.0)
|
||||
void LLFace::setDefaultTexture(U32 nChannel, bool fShowDefault) const
|
||||
{
|
||||
bool fUpdated = false;
|
||||
if ( (LLRender::DIFFUSE_MAP == nChannel) && (mVObjp) && (!mVObjp->isDead()) && ((LL_PCODE_VOLUME == mVObjp->getPCode()) || (LLViewerObject::LL_VO_PART_GROUP == mVObjp->getPCode())) )
|
||||
{
|
||||
if ( ((mShowDiffTexture) && (fShowDefault)) ||
|
||||
((!mShowDiffTexture) && (fShowDefault) && (mOrigDiffTexture.notNull()) && (mTexture[nChannel]) && (mTexture[nChannel]->getID() != LLViewerFetchedTexture::sDefaultDiffuseImagep->getID())) )
|
||||
{
|
||||
if (mOrigDiffTexture.notNull())
|
||||
mShowDiffTexture = true; // Swap out the default texture
|
||||
else
|
||||
mOrigDiffTexture = mTexture[nChannel]; // Cache the original texture
|
||||
|
||||
if ( (!gRlvHandler.hasBehaviour(RLV_BHVR_SETCAM_TEXTURES)) || (!mVObjp->isAttachment()) )
|
||||
{
|
||||
if (LL_PCODE_VOLUME == mVObjp->getPCode())
|
||||
const_cast<LLFace*>(this)->switchTexture(nChannel, LLViewerFetchedTexture::sDefaultDiffuseImagep);
|
||||
else
|
||||
const_cast<LLFace*>(this)->setTexture(nChannel, LLViewerFetchedTexture::sDefaultDiffuseImagep);
|
||||
}
|
||||
mShowDiffTexture = false; fUpdated = true;
|
||||
}
|
||||
else if ( (!mShowDiffTexture) && (!fShowDefault) && (mOrigDiffTexture.notNull()) )
|
||||
{
|
||||
mShowDiffTexture = true;
|
||||
if (LL_PCODE_VOLUME == mVObjp->getPCode())
|
||||
const_cast<LLFace*>(this)->switchTexture(nChannel, mOrigDiffTexture);
|
||||
else
|
||||
const_cast<LLFace*>(this)->setTexture(nChannel, mOrigDiffTexture);
|
||||
mOrigDiffTexture = nullptr; fUpdated = true;
|
||||
}
|
||||
|
||||
if ((fUpdated) && (mDrawablep))
|
||||
{
|
||||
gPipeline.markTextured(mDrawablep);
|
||||
const_cast<LLDrawable*>(mDrawablep.get())->updateTexture();
|
||||
}
|
||||
}
|
||||
|
||||
// Always flip the flag even if we didn't obscure so we don't keep wasting cycles with negative checks
|
||||
mShowDiffTexture = !fShowDefault;
|
||||
}
|
||||
// [/SL:KB]
|
||||
|
||||
void LLFace::setVertexBuffer(LLVertexBuffer* buffer)
|
||||
{
|
||||
mVertexBuffer = buffer;
|
||||
|
|
|
|||
|
|
@ -220,6 +220,10 @@ public:
|
|||
|
||||
BOOL switchTexture() ;
|
||||
|
||||
// [SL:KB] - Patch: Render-TextureToggle (Catznip-4.0)
|
||||
void setDefaultTexture(U32 nChannel, bool fShowDefault) const;
|
||||
// [/SL:KB]
|
||||
|
||||
//vertex buffer tracking
|
||||
void setVertexBuffer(LLVertexBuffer* buffer);
|
||||
void clearVertexBuffer(); //sets mVertexBuffer to NULL
|
||||
|
|
@ -294,7 +298,11 @@ private:
|
|||
F32 mBoundingSphereRadius ;
|
||||
bool mHasMedia ;
|
||||
|
||||
|
||||
// [SL:KB] - Patch: Render-TextureToggle (Catznip-4.0)
|
||||
mutable bool mShowDiffTexture;
|
||||
mutable LLPointer<LLViewerTexture> mOrigDiffTexture;
|
||||
// [/SL:KB]
|
||||
|
||||
protected:
|
||||
static BOOL sSafeRenderSelect;
|
||||
|
||||
|
|
|
|||
|
|
@ -37,6 +37,10 @@
|
|||
#include "llviewercontrol.h"
|
||||
#include "llviewerregion.h" // getCapability()
|
||||
#include "llworld.h"
|
||||
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.2a)
|
||||
#include "rlvactions.h"
|
||||
#include "rlvhandler.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
// Linden libraries
|
||||
#include "llavatarnamecache.h" // IDEVO
|
||||
|
|
@ -279,6 +283,23 @@ void LLFloaterAvatarPicker::onRangeAdjust()
|
|||
void LLFloaterAvatarPicker::onList()
|
||||
{
|
||||
getChildView("ok_btn")->setEnabled(isSelectBtnEnabled());
|
||||
|
||||
// [RLVa:KB] - Checked: 2010-06-05 (RLVa-1.2.2a) | Modified: RLVa-1.2.0d
|
||||
if (rlv_handler_t::isEnabled())
|
||||
{
|
||||
LLTabContainer* pTabs = getChild<LLTabContainer>("ResidentChooserTabs");
|
||||
LLPanel* pNearMePanel = getChild<LLPanel>("NearMePanel");
|
||||
RLV_ASSERT( (pTabs) && (pNearMePanel) );
|
||||
if ( (pTabs) && (pNearMePanel) )
|
||||
{
|
||||
// TODO-RLVa: check this for RlvActions::canShowName()
|
||||
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()
|
||||
|
|
@ -589,7 +610,10 @@ BOOL LLFloaterAvatarPicker::handleDragAndDrop(S32 x, S32 y, MASK mask,
|
|||
std::string avatar_name = selection->getColumn(0)->getValue().asString();
|
||||
if (dest_agent_id.notNull() && dest_agent_id != gAgentID)
|
||||
{
|
||||
if (drop)
|
||||
// if (drop)
|
||||
// [RLVa:KB] - Checked: 2011-04-11 (RLVa-1.3.0)
|
||||
if ( (drop) && (RlvActions::canStartIM(dest_agent_id)) )
|
||||
// [/RLVa:KB]
|
||||
{
|
||||
// Start up IM before give the item
|
||||
session_id = gIMMgr->addSession(avatar_name, IM_NOTHING_SPECIAL, dest_agent_id);
|
||||
|
|
|
|||
|
|
@ -104,7 +104,10 @@ void LLFloaterBuy::show(const LLSaleInfo& sale_info)
|
|||
// Clean up the lists...
|
||||
floater->reset();
|
||||
floater->mSaleInfo = sale_info;
|
||||
floater->mObjectSelection = LLSelectMgr::getInstance()->getEditSelection();
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.0
|
||||
floater->mObjectSelection = LLSelectMgr::getInstance()->getSelection();
|
||||
// [/RLVa:KB]
|
||||
// floater->mObjectSelection = LLSelectMgr::getInstance()->getEditSelection();
|
||||
|
||||
LLSelectNode* node = selection->getFirstRootNode();
|
||||
if (!node)
|
||||
|
|
|
|||
|
|
@ -104,7 +104,10 @@ void LLFloaterBuyContents::show(const LLSaleInfo& sale_info)
|
|||
if (list)
|
||||
list->deleteAllItems();
|
||||
|
||||
floater->mObjectSelection = LLSelectMgr::getInstance()->getEditSelection();
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.0
|
||||
floater->mObjectSelection = LLSelectMgr::getInstance()->getSelection();
|
||||
// [/RLVa:KB]
|
||||
// floater->mObjectSelection = LLSelectMgr::getInstance()->getEditSelection();
|
||||
|
||||
LLUUID owner_id;
|
||||
std::string owner_name;
|
||||
|
|
|
|||
|
|
@ -67,6 +67,10 @@
|
|||
#include "llviewerchat.h"
|
||||
#include "lltranslate.h"
|
||||
#include "llautoreplace.h"
|
||||
// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0b)
|
||||
#include "rlvhandler.h"
|
||||
#include "rlvactions.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
S32 LLFloaterIMNearbyChat::sLastSpecialChatChannel = 0;
|
||||
|
||||
|
|
@ -75,7 +79,10 @@ const S32 COLLAPSED_HEIGHT = 60;
|
|||
const S32 EXPANDED_MIN_HEIGHT = 150;
|
||||
|
||||
// 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-0.2.2)
|
||||
void send_chat_from_viewer(std::string utf8_out_text, EChatType type, S32 channel);
|
||||
// [/RLVa:KB]
|
||||
|
||||
struct LLChatTypeTrigger {
|
||||
std::string name;
|
||||
|
|
@ -835,8 +842,57 @@ LLWString LLFloaterIMNearbyChat::stripChannelNumber(const LLWString &mesg, S32*
|
|||
}
|
||||
}
|
||||
|
||||
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 (!RlvActions::canSendChannel(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);
|
||||
|
|
|
|||
|
|
@ -45,7 +45,13 @@
|
|||
#include "llrootview.h"
|
||||
#include "lllayoutstack.h"
|
||||
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.0
|
||||
#include "rlvactions.h"
|
||||
#include "rlvcommon.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
//add LLFloaterIMNearbyChatHandler to LLNotificationsUI namespace
|
||||
|
||||
using namespace LLNotificationsUI;
|
||||
|
||||
static LLFloaterIMNearbyChatToastPanel* createToastPanel()
|
||||
|
|
@ -485,6 +491,24 @@ void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg,
|
|||
if(chat_msg.mText.empty())
|
||||
return;//don't process empty messages
|
||||
|
||||
// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.0f) | Modified: RLVa-1.2.0f
|
||||
if (RlvActions::isRlvEnabled())
|
||||
{
|
||||
// NOTE-RLVa: we can only filter the *message* here since most everything else will already be part of "args" as well
|
||||
LLChat& tmp_chat = const_cast<LLChat&>(chat_msg);
|
||||
if ( (!RlvActions::canShowLocation()) && (!tmp_chat.mRlvLocFiltered) && (CHAT_SOURCE_AGENT != tmp_chat.mSourceType) )
|
||||
{
|
||||
RlvUtil::filterLocation(tmp_chat.mText);
|
||||
tmp_chat.mRlvLocFiltered = TRUE;
|
||||
}
|
||||
if ( (!RlvActions::canShowName(RlvActions::SNC_DEFAULT)) && (!tmp_chat.mRlvNamesFiltered) && (CHAT_SOURCE_AGENT != tmp_chat.mSourceType) )
|
||||
{
|
||||
RlvUtil::filterNames(tmp_chat.mText);
|
||||
tmp_chat.mRlvNamesFiltered = TRUE;
|
||||
}
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
LLFloaterReg::getInstance("im_container");
|
||||
LLFloaterIMNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLFloaterIMNearbyChat>("nearby_chat");
|
||||
|
||||
|
|
@ -498,7 +522,11 @@ void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg,
|
|||
chat["chat_type"] = (S32)chat_msg.mChatType;
|
||||
chat["chat_style"] = (S32)chat_msg.mChatStyle;
|
||||
// Pass sender info so that it can be rendered properly (STORM-1021).
|
||||
chat["sender_slurl"] = LLViewerChat::getSenderSLURL(chat_msg, args);
|
||||
// chat["sender_slurl"] = LLViewerChat::getSenderSLURL(chat_msg, args);
|
||||
// [RLVa:KB] - Checked: 2011-12-13 (RLVa-1.4.6) | Added: RLVa-1.4.6
|
||||
if ((CHAT_SOURCE_AGENT != chat_msg.mSourceType) || (!chat_msg.mRlvNamesFiltered))
|
||||
chat["sender_slurl"] = LLViewerChat::getSenderSLURL(chat_msg, args);
|
||||
// [/RLVa:KB]
|
||||
|
||||
if (chat_msg.mChatType == CHAT_TYPE_DIRECT &&
|
||||
chat_msg.mText.length() > 0 &&
|
||||
|
|
@ -547,8 +575,11 @@ void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg,
|
|||
LLFirstUse::otherAvatarChatFirst();
|
||||
|
||||
// Add sender to the recent people list.
|
||||
LLRecentPeople::instance().add(chat_msg.mFromID);
|
||||
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.0
|
||||
if ( (!RlvActions::isRlvEnabled()) || (RlvActions::canShowName(RlvActions::SNC_DEFAULT, chat_msg.mFromID)) )
|
||||
LLRecentPeople::instance().add(chat_msg.mFromID);
|
||||
// [/RLVa:KB]
|
||||
// LLRecentPeople::instance().add(chat_msg.mFromID);
|
||||
}
|
||||
|
||||
// Send event on to LLEventStream
|
||||
|
|
@ -640,6 +671,10 @@ void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg,
|
|||
LLUUID id;
|
||||
id.generate();
|
||||
chat["id"] = id;
|
||||
// [RLVa:KB] - Checked: RLVa-1.2.0
|
||||
if (RlvActions::isRlvEnabled())
|
||||
chat["show_icon_tooltip"] = !chat_msg.mRlvNamesFiltered;
|
||||
// [/RLVa:KB]
|
||||
std::string r_color_name = "White";
|
||||
F32 r_color_alpha = 1.0f;
|
||||
LLViewerChat::getChatColor( chat_msg, r_color_name, r_color_alpha);
|
||||
|
|
|
|||
|
|
@ -62,6 +62,10 @@
|
|||
#include "llnotificationmanager.h"
|
||||
#include "llautoreplace.h"
|
||||
#include "llcorehttputil.h"
|
||||
// [RLVa:KB] - Checked: 2013-05-10 (RLVa-1.4.9)
|
||||
#include "rlvactions.h"
|
||||
#include "rlvcommon.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
const F32 ME_TYPING_TIMEOUT = 4.0f;
|
||||
const F32 OTHER_TYPING_TIMEOUT = 9.0f;
|
||||
|
|
@ -268,7 +272,60 @@ void LLFloaterIMSession::sendMsgFromInputEditor()
|
|||
|
||||
void LLFloaterIMSession::sendMsg(const std::string& msg)
|
||||
{
|
||||
const std::string utf8_text = utf8str_truncate(msg, MAX_MSG_BUF_SIZE - 1);
|
||||
// const std::string utf8_text = utf8str_truncate(msg, MAX_MSG_BUF_SIZE - 1);
|
||||
// [RLVa:KB] - Checked: 2010-11-30 (RLVa-1.3.0)
|
||||
std::string utf8_text = utf8str_truncate(msg, MAX_MSG_BUF_SIZE - 1);
|
||||
|
||||
if ( (RlvActions::hasBehaviour(RLV_BHVR_SENDIM)) || (RlvActions::hasBehaviour(RLV_BHVR_SENDIMTO)) )
|
||||
{
|
||||
const 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
|
||||
fRlvFilter = !RlvActions::canSendIM(mOtherParticipantUUID);
|
||||
break;
|
||||
case LLIMModel::LLIMSession::GROUP_SESSION: // Group chat
|
||||
fRlvFilter = !RlvActions::canSendIM(mSessionID);
|
||||
break;
|
||||
case LLIMModel::LLIMSession::ADHOC_SESSION: // Conference chat: allow if all participants can be sent an IM
|
||||
{
|
||||
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) && (!RlvActions::canSendIM(pSpeaker->mID)) )
|
||||
{
|
||||
fRlvFilter = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
fRlvFilter = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (fRlvFilter)
|
||||
{
|
||||
utf8_text = RlvStrings::getString(RLV_STRING_BLOCKED_SENDIM);
|
||||
}
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
if (mSessionInitialized)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -42,6 +42,11 @@
|
|||
#include "llviewercontrol.h"
|
||||
#include "llviewerobject.h"
|
||||
#include "lluictrlfactory.h"
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.1
|
||||
#include "rlvactions.h"
|
||||
#include "rlvcommon.h"
|
||||
#include "rlvui.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
//LLFloaterInspect* LLFloaterInspect::sInstance = NULL;
|
||||
|
||||
|
|
@ -101,11 +106,13 @@ void LLFloaterInspect::onOpen(const LLSD& key)
|
|||
mObjectSelection = LLSelectMgr::getInstance()->getSelection();
|
||||
refresh();
|
||||
}
|
||||
void LLFloaterInspect::onClickCreatorProfile()
|
||||
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.1
|
||||
const LLSelectNode* LLFloaterInspect::getSelectedNode() /*const*/
|
||||
{
|
||||
if(mObjectList->getAllSelected().size() == 0)
|
||||
{
|
||||
return;
|
||||
return NULL;
|
||||
}
|
||||
LLScrollListItem* first_selected =mObjectList->getFirstSelected();
|
||||
|
||||
|
|
@ -120,32 +127,29 @@ void LLFloaterInspect::onClickCreatorProfile()
|
|||
return (obj_id == node->getObject()->getID());
|
||||
}
|
||||
} func(first_selected->getUUID());
|
||||
LLSelectNode* node = mObjectSelection->getFirstNode(&func);
|
||||
return mObjectSelection->getFirstNode(&func);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void LLFloaterInspect::onClickCreatorProfile()
|
||||
{
|
||||
const LLSelectNode* node = getSelectedNode();
|
||||
if(node)
|
||||
{
|
||||
LLAvatarActions::showProfile(node->mPermissions->getCreator());
|
||||
// Only anonymize the creator if they're also the owner or if they're a nearby avie
|
||||
const LLUUID& idCreator = node->mPermissions->getCreator();
|
||||
if ( (!RlvActions::canShowName(RlvActions::SNC_DEFAULT, idCreator)) && ((node->mPermissions->getOwner() == idCreator) || (RlvUtil::isNearbyAgent(idCreator))) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
LLAvatarActions::showProfile(idCreator);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterInspect::onClickOwnerProfile()
|
||||
{
|
||||
if(mObjectList->getAllSelected().size() == 0) return;
|
||||
LLScrollListItem* first_selected =mObjectList->getFirstSelected();
|
||||
|
||||
if (first_selected)
|
||||
{
|
||||
LLUUID selected_id = first_selected->getUUID();
|
||||
struct f : public LLSelectedNodeFunctor
|
||||
{
|
||||
LLUUID obj_id;
|
||||
f(const LLUUID& id) : obj_id(id) {}
|
||||
virtual bool apply(LLSelectNode* node)
|
||||
{
|
||||
return (obj_id == node->getObject()->getID());
|
||||
}
|
||||
} func(selected_id);
|
||||
LLSelectNode* node = mObjectSelection->getFirstNode(&func);
|
||||
const LLSelectNode* node = getSelectedNode();
|
||||
if(node)
|
||||
{
|
||||
if(node->mPermissions->isGroupOwned())
|
||||
|
|
@ -156,21 +160,108 @@ void LLFloaterInspect::onClickOwnerProfile()
|
|||
else
|
||||
{
|
||||
const LLUUID& owner_id = node->mPermissions->getOwner();
|
||||
if (!RlvActions::canShowName(RlvActions::SNC_DEFAULT, owner_id))
|
||||
return;
|
||||
LLAvatarActions::showProfile(owner_id);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterInspect::onSelectObject()
|
||||
{
|
||||
if(LLFloaterInspect::getSelectedUUID() != LLUUID::null)
|
||||
{
|
||||
getChildView("button owner")->setEnabled(true);
|
||||
getChildView("button creator")->setEnabled(true);
|
||||
if (!RlvActions::isRlvEnabled())
|
||||
{
|
||||
getChildView("button owner")->setEnabled(true);
|
||||
getChildView("button creator")->setEnabled(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
const LLSelectNode* node = getSelectedNode();
|
||||
const LLUUID& idOwner = (node) ? node->mPermissions->getOwner() : LLUUID::null;
|
||||
const LLUUID& idCreator = (node) ? node->mPermissions->getCreator() : LLUUID::null;
|
||||
|
||||
// See LLFloaterInspect::onClickCreatorProfile()
|
||||
getChildView("button owner")->setEnabled( (RlvActions::canShowName(RlvActions::SNC_DEFAULT, idOwner)) || ((node) && (node->mPermissions->isGroupOwned())) );
|
||||
// See LLFloaterInspect::onClickOwnerProfile()
|
||||
getChildView("button creator")->setEnabled( ((idOwner != idCreator) && (!RlvUtil::isNearbyAgent(idCreator))) || (RlvActions::canShowName(RlvActions::SNC_DEFAULT, idCreator)) );
|
||||
}
|
||||
}
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
//void LLFloaterInspect::onClickCreatorProfile()
|
||||
//{
|
||||
// if(mObjectList->getAllSelected().size() == 0)
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
// LLScrollListItem* first_selected =mObjectList->getFirstSelected();
|
||||
//
|
||||
// if (first_selected)
|
||||
// {
|
||||
// struct f : public LLSelectedNodeFunctor
|
||||
// {
|
||||
// LLUUID obj_id;
|
||||
// f(const LLUUID& id) : obj_id(id) {}
|
||||
// virtual bool apply(LLSelectNode* node)
|
||||
// {
|
||||
// return (obj_id == node->getObject()->getID());
|
||||
// }
|
||||
// } func(first_selected->getUUID());
|
||||
// LLSelectNode* node = mObjectSelection->getFirstNode(&func);
|
||||
// if(node)
|
||||
// {
|
||||
// LLAvatarActions::showProfile(node->mPermissions->getCreator());
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
//void LLFloaterInspect::onClickOwnerProfile()
|
||||
//{
|
||||
// if(mObjectList->getAllSelected().size() == 0) return;
|
||||
// LLScrollListItem* first_selected =mObjectList->getFirstSelected();
|
||||
//
|
||||
// if (first_selected)
|
||||
// {
|
||||
// LLUUID selected_id = first_selected->getUUID();
|
||||
// struct f : public LLSelectedNodeFunctor
|
||||
// {
|
||||
// LLUUID obj_id;
|
||||
// f(const LLUUID& id) : obj_id(id) {}
|
||||
// virtual bool apply(LLSelectNode* node)
|
||||
// {
|
||||
// return (obj_id == node->getObject()->getID());
|
||||
// }
|
||||
// } func(selected_id);
|
||||
// LLSelectNode* node = mObjectSelection->getFirstNode(&func);
|
||||
// if(node)
|
||||
// {
|
||||
// if(node->mPermissions->isGroupOwned())
|
||||
// {
|
||||
// const LLUUID& idGroup = node->mPermissions->getGroup();
|
||||
// LLGroupActions::show(idGroup);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// const LLUUID& owner_id = node->mPermissions->getOwner();
|
||||
// LLAvatarActions::showProfile(owner_id);
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
//void LLFloaterInspect::onSelectObject()
|
||||
//{
|
||||
// if(LLFloaterInspect::getSelectedUUID() != LLUUID::null)
|
||||
// {
|
||||
// getChildView("button owner")->setEnabled(true);
|
||||
// getChildView("button creator")->setEnabled(true);
|
||||
// }
|
||||
//}
|
||||
|
||||
LLUUID LLFloaterInspect::getSelectedUUID()
|
||||
{
|
||||
|
|
@ -254,7 +345,11 @@ void LLFloaterInspect::refresh()
|
|||
// actual name and set a placeholder.
|
||||
if (LLAvatarNameCache::get(idOwner, &av_name))
|
||||
{
|
||||
owner_name = av_name.getCompleteName();
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.1
|
||||
bool fRlvCanShowName = (RlvActions::canShowName(RlvActions::SNC_DEFAULT, idOwner)) || (obj->mPermissions->isGroupOwned());
|
||||
owner_name = (fRlvCanShowName) ? av_name.getCompleteName() : RlvStrings::getAnonym(av_name);
|
||||
// [/RLVa:KB]
|
||||
// owner_name = av_name.getCompleteName();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -269,7 +364,12 @@ void LLFloaterInspect::refresh()
|
|||
|
||||
if (LLAvatarNameCache::get(idCreator, &av_name))
|
||||
{
|
||||
creator_name = av_name.getCompleteName();
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.1
|
||||
const LLUUID& idCreator = obj->mPermissions->getCreator();
|
||||
bool fRlvCanShowName = (RlvActions::canShowName(RlvActions::SNC_DEFAULT, idCreator)) || ( (obj->mPermissions->getOwner() != idCreator) && (!RlvUtil::isNearbyAgent(idCreator)) );
|
||||
creator_name = (fRlvCanShowName) ? av_name.getCompleteName() : RlvStrings::getAnonym(av_name);
|
||||
// [/RLVa:KB]
|
||||
// creator_name = av_name.getCompleteName();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -36,6 +36,9 @@
|
|||
class LLObjectSelection;
|
||||
class LLScrollListCtrl;
|
||||
class LLUICtrl;
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.1
|
||||
class LLSelectNode;
|
||||
// [/RLVa:KB]
|
||||
|
||||
class LLFloaterInspect : public LLFloater
|
||||
{
|
||||
|
|
@ -61,6 +64,10 @@ protected:
|
|||
void setDirty() { mDirty = TRUE; }
|
||||
bool mDirty;
|
||||
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.1
|
||||
const LLSelectNode* getSelectedNode() /*const*/;
|
||||
// [/RLVa:KB]
|
||||
|
||||
private:
|
||||
void onGetOwnerNameCallback();
|
||||
void onGetCreatorNameCallback();
|
||||
|
|
|
|||
|
|
@ -108,6 +108,10 @@
|
|||
#include "llteleporthistorystorage.h"
|
||||
#include "llproxy.h"
|
||||
#include "llweb.h"
|
||||
// [RLVa:KB] - Checked: 2010-03-18 (RLVa-1.2.0a)
|
||||
#include "rlvactions.h"
|
||||
#include "rlvhandler.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
#include "lllogininstance.h" // to check if logged in yet
|
||||
#include "llsdserialize.h"
|
||||
|
|
@ -1239,6 +1243,13 @@ void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState()
|
|||
LLComboBox* ctrl_reflections = getChild<LLComboBox>("Reflections");
|
||||
LLTextBox* reflections_text = getChild<LLTextBox>("ReflectionsText");
|
||||
|
||||
// [RLVa:KB] - Checked: 2013-05-11 (RLVa-1.4.9)
|
||||
if (rlv_handler_t::isEnabled())
|
||||
{
|
||||
getChild<LLUICtrl>("do_not_disturb_response")->setEnabled(!RlvActions::hasBehaviour(RLV_BHVR_SENDIM));
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
// Reflections
|
||||
BOOL reflections = gSavedSettings.getBOOL("VertexShaderEnable")
|
||||
&& gGLManager.mHasCubeMap
|
||||
|
|
@ -1282,8 +1293,14 @@ void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState()
|
|||
LLSliderCtrl* terrain_detail = getChild<LLSliderCtrl>("TerrainDetail"); // can be linked with control var
|
||||
LLTextBox* terrain_text = getChild<LLTextBox>("TerrainDetailText");
|
||||
|
||||
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)
|
||||
{
|
||||
|
|
@ -1304,7 +1321,13 @@ void LLFloaterPreferenceGraphicsAdvanced::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]
|
||||
|
||||
sky->setEnabled(ctrl_wind_light->get() && shaders);
|
||||
sky_text->setEnabled(ctrl_wind_light->get() && shaders);
|
||||
|
|
|
|||
|
|
@ -59,6 +59,10 @@
|
|||
|
||||
#include "lluictrlfactory.h"
|
||||
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.1
|
||||
#include "rlvactions.h"
|
||||
#include "rlvcommon.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Class LLPropertiesObserver
|
||||
|
|
@ -279,6 +283,15 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
|
|||
getChildView("BtnCreator")->setEnabled(TRUE);
|
||||
getChildView("LabelCreatorTitle")->setEnabled(TRUE);
|
||||
getChildView("LabelCreatorName")->setEnabled(TRUE);
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.1
|
||||
// If the object creator matches the object owner we need to anonymize the creator field as well
|
||||
if ( (!RlvActions::canShowName(RlvActions::SNC_DEFAULT, item->getCreatorUUID())) &&
|
||||
( ((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
|
||||
|
|
@ -294,6 +307,9 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
|
|||
////////////////
|
||||
if(perm.isOwned())
|
||||
{
|
||||
// [RLVa:KB] - Checked: RVLa-2.0.1
|
||||
bool fRlvCanShowOwner = true;
|
||||
// [/RLVa:KB]
|
||||
std::string name;
|
||||
if (perm.isGroupOwned())
|
||||
{
|
||||
|
|
@ -302,8 +318,19 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
|
|||
else
|
||||
{
|
||||
gCacheName->getFullName(perm.getOwner(), name);
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.1
|
||||
if (RlvActions::isRlvEnabled())
|
||||
{
|
||||
fRlvCanShowOwner = RlvActions::canShowName(RlvActions::SNC_DEFAULT, perm.getOwner());
|
||||
if (!fRlvCanShowOwner)
|
||||
name = RlvStrings::getAnonym(name);
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
}
|
||||
getChildView("BtnOwner")->setEnabled(TRUE);
|
||||
// getChildView("BtnOwner")->setEnabled(TRUE);
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.1
|
||||
getChildView("BtnOwner")->setEnabled(fRlvCanShowOwner);
|
||||
// [/RLVa:KB]
|
||||
getChildView("LabelOwnerTitle")->setEnabled(TRUE);
|
||||
getChildView("LabelOwnerName")->setEnabled(TRUE);
|
||||
getChild<LLUICtrl>("LabelOwnerName")->setValue(name);
|
||||
|
|
@ -540,6 +567,17 @@ void LLFloaterProperties::onClickCreator()
|
|||
if(!item) return;
|
||||
if(!item->getCreatorUUID().isNull())
|
||||
{
|
||||
// [RLVa:KB] - Checked: RLVa-1.2.1
|
||||
const LLUUID& idCreator = item->getCreatorUUID();
|
||||
if ( (RlvActions::isRlvEnabled()) && (!RlvActions::canShowName(RlvActions::SNC_DEFAULT, idCreator)) )
|
||||
{
|
||||
const LLPermissions& perm = item->getPermissions();
|
||||
if ( ((perm.isOwned()) && (!perm.isGroupOwned()) && (perm.getOwner() == idCreator) ) || (RlvUtil::isNearbyAgent(idCreator)) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
LLAvatarActions::showProfile(item->getCreatorUUID());
|
||||
}
|
||||
}
|
||||
|
|
@ -555,6 +593,10 @@ void LLFloaterProperties::onClickOwner()
|
|||
}
|
||||
else
|
||||
{
|
||||
// [RLVa:KB] - Checked: RLVa-1.0.0
|
||||
if ( (RlvActions::isRlvEnabled()) && (!RlvActions::canShowName(RlvActions::SNC_DEFAULT, item->getPermissions().getOwner())) )
|
||||
return;
|
||||
// [/RLVa:KB]
|
||||
LLAvatarActions::showProfile(item->getPermissions().getOwner());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -318,6 +318,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);
|
||||
|
|
|
|||
|
|
@ -209,6 +209,20 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp)
|
|||
|
||||
if (controlp)
|
||||
{
|
||||
// [RLVa:KB] - Checked: 2011-05-28 (RLVa-1.4.0a) | Modified: RLVa-1.4.0a
|
||||
// If "HideFromEditor" was toggled while the floater is open then we need to manually disable access to the control
|
||||
// NOTE: this runs per-frame so there's no need to explictly handle onCommitSettings() or onClickDefault()
|
||||
bool fEnable = !controlp->isHiddenFromSettingsEditor();
|
||||
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
|
||||
|
|
|
|||
|
|
@ -39,6 +39,10 @@
|
|||
//static
|
||||
const std::string LLFloaterSidePanelContainer::sMainPanelName("main_panel");
|
||||
|
||||
// [RLVa:KB] - Checked: 2012-02-07 (RLVa-1.4.5) | Added: RLVa-1.4.5
|
||||
LLFloaterSidePanelContainer::validate_signal_t LLFloaterSidePanelContainer::mValidateSignal;
|
||||
// [/RLVa:KB]
|
||||
|
||||
LLFloaterSidePanelContainer::LLFloaterSidePanelContainer(const LLSD& key, const Params& params)
|
||||
: LLFloater(key, params)
|
||||
{
|
||||
|
|
@ -108,10 +112,25 @@ LLPanel* LLFloaterSidePanelContainer::openChildPanel(const std::string& panel_na
|
|||
return panel;
|
||||
}
|
||||
|
||||
// [RLVa:KB] - Checked: 2012-02-07 (RLVa-1.4.5) | Added: RLVa-1.4.5
|
||||
bool LLFloaterSidePanelContainer::canShowPanel(const std::string& floater_name, const LLSD& key)
|
||||
{
|
||||
return mValidateSignal(floater_name, sMainPanelName, key);
|
||||
}
|
||||
|
||||
bool LLFloaterSidePanelContainer::canShowPanel(const std::string& floater_name, const std::string& panel_name, const LLSD& key)
|
||||
{
|
||||
return mValidateSignal(floater_name, panel_name, key);
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
void LLFloaterSidePanelContainer::showPanel(const std::string& floater_name, const LLSD& key)
|
||||
{
|
||||
LLFloaterSidePanelContainer* floaterp = LLFloaterReg::getTypedInstance<LLFloaterSidePanelContainer>(floater_name);
|
||||
if (floaterp)
|
||||
// if (floaterp)
|
||||
// [RLVa:KB] - Checked: 2013-04-16 (RLVa-1.4.8)
|
||||
if ( (floaterp) && ((floaterp->getVisible()) || (LLFloaterReg::canShowInstance(floater_name, key))) && (canShowPanel(floater_name, key)) )
|
||||
// [/RLVa:KB]
|
||||
{
|
||||
floaterp->openChildPanel(sMainPanelName, key);
|
||||
}
|
||||
|
|
@ -120,7 +139,10 @@ void LLFloaterSidePanelContainer::showPanel(const std::string& floater_name, con
|
|||
void LLFloaterSidePanelContainer::showPanel(const std::string& floater_name, const std::string& panel_name, const LLSD& key)
|
||||
{
|
||||
LLFloaterSidePanelContainer* floaterp = LLFloaterReg::getTypedInstance<LLFloaterSidePanelContainer>(floater_name);
|
||||
if (floaterp)
|
||||
// if (floaterp)
|
||||
// [RLVa:KB] - Checked: 2013-04-16 (RLVa-1.4.8)
|
||||
if ( (floaterp) && ((floaterp->getVisible()) || (LLFloaterReg::canShowInstance(floater_name, key))) && (canShowPanel(floater_name, panel_name, key)) )
|
||||
// [/RLVa:KB]
|
||||
{
|
||||
floaterp->openChildPanel(panel_name, key);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,6 +55,11 @@ public:
|
|||
|
||||
LLPanel* openChildPanel(const std::string& panel_name, const LLSD& params);
|
||||
|
||||
// [RLVa:KB] - Checked: 2012-02-07 (RLVa-1.4.5) | Added: RLVa-1.4.5
|
||||
static bool canShowPanel(const std::string& floater_name, const LLSD& key);
|
||||
static bool canShowPanel(const std::string& floater_name, const std::string& panel_name, const LLSD& key);
|
||||
// [/RLVa:KB]
|
||||
|
||||
static void showPanel(const std::string& floater_name, const LLSD& key);
|
||||
|
||||
static void showPanel(const std::string& floater_name, const std::string& panel_name, const LLSD& key);
|
||||
|
|
@ -78,6 +83,15 @@ public:
|
|||
}
|
||||
return panel;
|
||||
}
|
||||
|
||||
// [RLVa:KB] - Checked: 2012-02-07 (RLVa-1.4.5) | Added: RLVa-1.4.5
|
||||
// Used to determine whether a sidepanel can be shown
|
||||
public:
|
||||
typedef boost::signals2::signal<bool(const std::string&, 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]
|
||||
};
|
||||
|
||||
#endif // LL_LLFLOATERSIDEPANELCONTAINER_H
|
||||
|
|
|
|||
|
|
@ -76,6 +76,10 @@
|
|||
#include "llwindow.h" // copyTextToClipboard()
|
||||
#include <algorithm>
|
||||
|
||||
// [RLVa:KB] - Checked: 2010-08-22 (RLVa-1.2.1a)
|
||||
#include "rlvhandler.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Constants
|
||||
//---------------------------------------------------------------------------
|
||||
|
|
@ -493,6 +497,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);
|
||||
|
|
@ -667,7 +675,10 @@ void LLFloaterWorldMap::trackLocation(const LLVector3d& pos_global)
|
|||
std::string tooltip("");
|
||||
mTrackedStatus = LLTracker::TRACKING_LOCATION;
|
||||
LLWorldMap::getInstance()->cancelTracking(); // The floater is taking over the tracking
|
||||
LLTracker::trackLocation(pos_global, full_name, tooltip);
|
||||
// [RLVa:KB] - Checked: 2012-02-08 (RLVa-1.4.5) | Added: RLVa-1.4.5
|
||||
LLTracker::trackLocation(pos_global, (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ? full_name : RlvStrings::getString(RLV_STRING_HIDDEN).c_str(), tooltip);
|
||||
// [/RLVa:KB]
|
||||
// LLTracker::trackLocation(pos_global, full_name, tooltip);
|
||||
|
||||
LLVector3d coord_pos = LLTracker::getTrackedPositionGlobal();
|
||||
updateTeleportCoordsDisplay( coord_pos );
|
||||
|
|
@ -681,9 +692,25 @@ void LLFloaterWorldMap::trackLocation(const LLVector3d& pos_global)
|
|||
// enable/disable teleport destination coordinates
|
||||
void LLFloaterWorldMap::enableTeleportCoordsDisplay( bool enabled )
|
||||
{
|
||||
childSetEnabled("teleport_coordinate_x", enabled );
|
||||
childSetEnabled("teleport_coordinate_y", enabled );
|
||||
childSetEnabled("teleport_coordinate_z", enabled );
|
||||
// [RLVa:KB] - Checked: 2012-02-08 (RLVa-1.4.5) | Added: RLVa-1.4.5
|
||||
LLUICtrl* pCtrl = getChild<LLUICtrl>("events_label");
|
||||
pCtrl->setVisible(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC));
|
||||
|
||||
pCtrl = getChild<LLUICtrl>("teleport_coordinate_x");
|
||||
pCtrl->setVisible(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC));
|
||||
pCtrl->setEnabled(enabled);
|
||||
|
||||
pCtrl = getChild<LLUICtrl>("teleport_coordinate_y");
|
||||
pCtrl->setVisible(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC));
|
||||
pCtrl->setEnabled(enabled);
|
||||
|
||||
pCtrl = getChild<LLUICtrl>("teleport_coordinate_z");
|
||||
pCtrl->setVisible(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC));
|
||||
pCtrl->setEnabled(enabled);
|
||||
// [/RLVa:KB]
|
||||
// childSetEnabled("teleport_coordinate_x", enabled );
|
||||
// childSetEnabled("teleport_coordinate_y", enabled );
|
||||
// childSetEnabled("teleport_coordinate_z", enabled );
|
||||
}
|
||||
|
||||
// update display of teleport destination coordinates - pos is in global coordinates
|
||||
|
|
@ -722,7 +749,22 @@ void LLFloaterWorldMap::updateLocation()
|
|||
// Make sure we know where we are before setting the current user position
|
||||
std::string agent_sim_name;
|
||||
gotSimName = LLWorldMap::getInstance()->simNameFromPosGlobal( agentPos, agent_sim_name );
|
||||
if ( gotSimName )
|
||||
// [RLVa:KB] - Checked: 2012-02-08 (RLVa-1.4.5) | Added: RLVa-1.4.5
|
||||
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
|
||||
{
|
||||
mSetToUserPosition = FALSE;
|
||||
|
||||
// Fill out the location field
|
||||
getChild<LLUICtrl>("location")->setValue(RlvStrings::getString(RLV_STRING_HIDDEN_REGION));
|
||||
|
||||
// update the coordinate display with location of avatar in region
|
||||
updateTeleportCoordsDisplay( agentPos );
|
||||
|
||||
mSLURL = LLSLURL();
|
||||
}
|
||||
else if (gotSimName)
|
||||
// [/RLVa:KB]
|
||||
// if ( gotSimName )
|
||||
{
|
||||
mSetToUserPosition = FALSE;
|
||||
|
||||
|
|
@ -767,7 +809,16 @@ void LLFloaterWorldMap::updateLocation()
|
|||
updateTeleportCoordsDisplay( coord_pos );
|
||||
|
||||
// simNameFromPosGlobal can fail, so don't give the user an invalid SLURL
|
||||
if ( gotSimName )
|
||||
// [RLVa:KB] - Checked: 2012-02-08 (RLVa-1.4.5) | Added: RLVa-1.4.5
|
||||
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
|
||||
{
|
||||
mSLURL = LLSLURL();
|
||||
|
||||
childSetValue("location", RlvStrings::getString(RLV_STRING_HIDDEN_REGION));
|
||||
}
|
||||
else if (gotSimName)
|
||||
// [/RLVa:KB]
|
||||
// if ( gotSimName )
|
||||
{
|
||||
mSLURL = LLSLURL(sim_name, pos_global);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,6 +56,10 @@
|
|||
#include "llappearancemgr.h"
|
||||
#include "llgesturelistener.h"
|
||||
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.0
|
||||
#include "rlvactions.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
// Longest time, in seconds, to wait for all animations to stop playing
|
||||
const F32 MAX_WAIT_ANIM_SECS = 30.f;
|
||||
|
||||
|
|
@ -527,6 +531,11 @@ void LLGestureMgr::playGesture(LLMultiGesture* gesture)
|
|||
{
|
||||
if (!gesture) return;
|
||||
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.0 | Handles: @sendgesture
|
||||
if (!RlvActions::canPlayGestures())
|
||||
return;
|
||||
// [/RLVa:KB]
|
||||
|
||||
// Reset gesture to first step
|
||||
gesture->mCurrentStep = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -46,6 +46,12 @@
|
|||
#include "llrecentpeople.h"
|
||||
#include "llviewerobjectlist.h"
|
||||
#include "llvoavatarself.h"
|
||||
// [RLVa:KB] - Checked: RLVa-1.2.2
|
||||
#include "llavatarnamecache.h"
|
||||
#include "rlvactions.h"
|
||||
#include "rlvcommon.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
|
||||
|
|
@ -317,6 +323,19 @@ void LLGiveInventory::logInventoryOffer(const LLUUID& to_agent, const LLUUID &im
|
|||
{
|
||||
gIMMgr->addSystemMessage(im_session_id, "inventory_item_offered", args);
|
||||
}
|
||||
// [RLVa:KB] - Checked: RLVa-1.2.0
|
||||
else if ( (RlvActions::isRlvEnabled()) && (!RlvActions::canShowName(RlvActions::SNC_DEFAULT, to_agent)) && (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 strMsgName = "inventory_item_offered-im"; LLSD args; LLAvatarName avName;
|
||||
if (LLAvatarNameCache::get(to_agent, &avName))
|
||||
{
|
||||
args["NAME"] = RlvStrings::getAnonym(avName);
|
||||
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))
|
||||
{
|
||||
|
|
@ -424,7 +443,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: RLVa-2.0.0
|
||||
// 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 ( (!RlvActions::isRlvEnabled()) ||
|
||||
(RlvActions::canShowName(RlvActions::SNC_DEFAULT, to_agent)) || (im_session_id.notNull()) || (!RlvUtil::isNearbyAgent(to_agent)) || (RlvUIEnabler::hasOpenProfile(to_agent)) )
|
||||
{
|
||||
LLRecentPeople::instance().add(to_agent);
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
}
|
||||
|
||||
// static
|
||||
|
|
@ -490,7 +517,15 @@ bool LLGiveInventory::commitGiveInventoryCategory(const LLUUID& to_agent,
|
|||
<< cat->getUUID() << LL_ENDL;
|
||||
|
||||
// add buddy to recent people list
|
||||
LLRecentPeople::instance().add(to_agent);
|
||||
// LLRecentPeople::instance().add(to_agent);
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.0
|
||||
// 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 ( (!RlvActions::isRlvEnabled()) ||
|
||||
(RlvActions::canShowName(RlvActions::SNC_DEFAULT, to_agent)) || (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;
|
||||
|
|
|
|||
|
|
@ -63,6 +63,11 @@
|
|||
#include "pipeline.h"
|
||||
#include "llspatialpartition.h"
|
||||
#include "llviewershadermgr.h"
|
||||
// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e)
|
||||
#include "rlvactions.h"
|
||||
#include "rlvhandler.h"
|
||||
#include "rlvhelper.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
// Height of the yellow selection highlight posts for land
|
||||
const F32 PARCEL_POST_HEIGHT = 0.666f;
|
||||
|
|
@ -70,6 +75,18 @@ 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-11-29 (RLVa-1.3.0c) | Modified: RLVa-1.3.0c
|
||||
// Block rectangle selection if:
|
||||
// - prevented from editing and no exceptions are set (see below for the case where exceptions are set)
|
||||
// - prevented from interacting at all
|
||||
if ( (rlv_handler_t::isEnabled()) &&
|
||||
( ((gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) && (!gRlvHandler.hasException(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;
|
||||
|
|
@ -134,6 +151,29 @@ 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))
|
||||
{
|
||||
static RlvCachedBehaviourModifier<float> s_nFartouchDist(RLV_MODIFIER_FARTOUCHDIST);
|
||||
|
||||
// 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() + s_nFartouchDist;
|
||||
F32 new_near = relative_av_pos * LLViewerCamera::getInstance()->getAtAxis() - s_nFartouchDist;
|
||||
|
||||
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 = s_nFartouchDist * s_nFartouchDist;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
LLViewerCamera::getInstance()->setPerspective(FOR_SELECTION,
|
||||
center_x-width/2, center_y-height/2, width, height,
|
||||
limit_select_distance);
|
||||
|
|
@ -208,6 +248,13 @@ void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask)
|
|||
continue;
|
||||
}
|
||||
|
||||
// [RLVa:KB] - Checked: 2010-11-29 (RLVa-1.3.0c) | Added: RLVa-1.3.0c
|
||||
if ( (RlvActions::isRlvEnabled()) && (!RlvActions::canEdit(vobjp)) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
S32 result = LLViewerCamera::getInstance()->sphereInFrustum(drawable->getPositionAgent(), drawable->getRadius());
|
||||
if (result)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -41,6 +41,12 @@
|
|||
#include "llnotificationsutil.h"
|
||||
#include "llstatusbar.h" // can_afford_transaction()
|
||||
#include "groupchatlistener.h"
|
||||
// [RLVa:KB] - Checked: 2011-03-28 (RLVa-1.3.0)
|
||||
#include "llslurl.h"
|
||||
#include "rlvactions.h"
|
||||
#include "rlvcommon.h"
|
||||
#include "rlvhandler.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
//
|
||||
// Globals
|
||||
|
|
@ -205,6 +211,15 @@ void LLGroupActions::startCall(const LLUUID& group_id)
|
|||
return;
|
||||
}
|
||||
|
||||
// [RLVa:KB] - Checked: 2013-05-09 (RLVa-1.4.9)
|
||||
if (!RlvActions::canStartIM(group_id))
|
||||
{
|
||||
make_ui_sound("UISndInvalidOp");
|
||||
RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_STARTIM, LLSD().with("RECIPIENT", LLSLURL("group", group_id, "about").getSLURLString()));
|
||||
return;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
LLUUID session_id = gIMMgr->addSession(gdata.mName, IM_SESSION_GROUP_START, group_id, true);
|
||||
if (session_id == LLUUID::null)
|
||||
{
|
||||
|
|
@ -278,7 +293,10 @@ bool LLGroupActions::onJoinGroup(const LLSD& notification, const LLSD& response)
|
|||
// static
|
||||
void LLGroupActions::leave(const LLUUID& group_id)
|
||||
{
|
||||
if (group_id.isNull())
|
||||
// if (group_id.isNull())
|
||||
// [RLVa:KB] - Checked: RLVa-1.3.0
|
||||
if ( (group_id.isNull()) || ((gAgent.getGroupID() == group_id) && (!RlvActions::canChangeActiveGroup())) )
|
||||
// [/RLVa:KB]
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -330,6 +348,13 @@ void LLGroupActions::processLeaveGroupDataResponse(const LLUUID group_id)
|
|||
// static
|
||||
void LLGroupActions::activate(const LLUUID& group_id)
|
||||
{
|
||||
// [RLVa:KB] - Checked: RLVa-1.3.0
|
||||
if ( (!RlvActions::canChangeActiveGroup()) && (gRlvHandler.getAgentGroup() != group_id) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
LLMessageSystem* msg = gMessageSystem;
|
||||
msg->newMessageFast(_PREHASH_ActivateGroup);
|
||||
msg->nextBlockFast(_PREHASH_AgentData);
|
||||
|
|
@ -426,6 +451,15 @@ LLUUID LLGroupActions::startIM(const LLUUID& group_id)
|
|||
{
|
||||
if (group_id.isNull()) return LLUUID::null;
|
||||
|
||||
// [RLVa:KB] - Checked: 2013-05-09 (RLVa-1.4.9)
|
||||
if (!RlvActions::canStartIM(group_id))
|
||||
{
|
||||
make_ui_sound("UISndInvalidOp");
|
||||
RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_STARTIM, LLSD().with("RECIPIENT", LLSLURL("group", group_id, "about").getSLURLString()));
|
||||
return LLUUID::null;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
LLGroupData group_data;
|
||||
if (gAgent.getGroupData(group_id, group_data))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -43,6 +43,9 @@
|
|||
#include "llviewercontrol.h" // for gSavedSettings
|
||||
#include "llviewermenu.h" // for gMenuHolder
|
||||
#include "llvoiceclient.h"
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.3
|
||||
#include "rlvactions.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
static LLDefaultChildRegistry::Register<LLGroupList> r("group_list");
|
||||
S32 LLGroupListItem::sIconWidth = 0;
|
||||
|
|
@ -281,8 +284,14 @@ bool LLGroupList::onContextMenuItemEnable(const LLSD& userdata)
|
|||
bool real_group_selected = selected_group_id.notNull(); // a "real" (not "none") group is selected
|
||||
|
||||
// each group including "none" can be activated
|
||||
// [RLVa:KB] - Checked: RLVa-1.3.0
|
||||
if (userdata.asString() == "activate")
|
||||
return gAgent.getGroupID() != selected_group_id;
|
||||
return (gAgent.getGroupID() != selected_group_id) && (RlvActions::canChangeActiveGroup());
|
||||
else if (userdata.asString() == "leave")
|
||||
return (real_group_selected) && ((gAgent.getGroupID() != selected_group_id) || (RlvActions::canChangeActiveGroup()));
|
||||
// [/RLVa:KB]
|
||||
// if (userdata.asString() == "activate")
|
||||
// return gAgent.getGroupID() != selected_group_id;
|
||||
|
||||
if (userdata.asString() == "call")
|
||||
return real_group_selected && LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking();
|
||||
|
|
|
|||
|
|
@ -46,6 +46,10 @@
|
|||
#include "llstatusbar.h"
|
||||
#include "llmenugl.h"
|
||||
#include "pipeline.h"
|
||||
// [RLVa:KB] - Checked: RLVa-1.4.0
|
||||
#include "rlvactions.h"
|
||||
#include "rlvhandler.h"
|
||||
// [/RLVa:KB]
|
||||
#include <boost/tokenizer.hpp>
|
||||
|
||||
const F32 HORIZONTAL_PADDING = 15.f;
|
||||
|
|
@ -241,7 +245,32 @@ void LLHUDText::renderText()
|
|||
void LLHUDText::setString(const std::string &text_utf8)
|
||||
{
|
||||
mTextSegments.clear();
|
||||
addLine(text_utf8, mColor);
|
||||
// addLine(text_utf8, mColor);
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.3
|
||||
// NOTE: setString() is called for debug and map beacons as well
|
||||
if (RlvActions::isRlvEnabled())
|
||||
{
|
||||
std::string text(text_utf8);
|
||||
if (gRlvHandler.canShowHoverText(mSourceObject))
|
||||
{
|
||||
if (!RlvActions::canShowLocation())
|
||||
RlvUtil::filterLocation(text);
|
||||
|
||||
bool fCanShowNearby = RlvActions::canShowNearbyAgents();
|
||||
if ( (!RlvActions::canShowName(RlvActions::SNC_DEFAULT)) || (!fCanShowNearby) )
|
||||
RlvUtil::filterNames(text, true, !fCanShowNearby);
|
||||
}
|
||||
else
|
||||
{
|
||||
text = "";
|
||||
}
|
||||
addLine(text, mColor);
|
||||
}
|
||||
else
|
||||
{
|
||||
addLine(text_utf8, mColor);
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
}
|
||||
|
||||
void LLHUDText::clearString()
|
||||
|
|
@ -630,3 +659,17 @@ F32 LLHUDText::LLHUDTextSegment::getWidth(const LLFontGL* font)
|
|||
return width;
|
||||
}
|
||||
}
|
||||
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.3
|
||||
void LLHUDText::refreshAllObjectText(EObjectTextFilter eObjFilter)
|
||||
{
|
||||
for (LLHUDText* pText : sTextObjects)
|
||||
{
|
||||
if ((pText) && (!pText->mObjText.empty()) && (pText->mSourceObject) && (LL_PCODE_VOLUME == pText->mSourceObject->getPCode()) &&
|
||||
((OTF_NONE == eObjFilter) || ((OTF_HUD_ATTACHMENTS == eObjFilter) && (pText->mSourceObject->isHUDAttachment()))))
|
||||
{
|
||||
pText->setString(pText->mObjText);
|
||||
}
|
||||
}
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
|
|
|||
|
|
@ -124,6 +124,13 @@ public:
|
|||
static void reshape();
|
||||
static void setDisplayText(BOOL flag) { sDisplayText = flag ; }
|
||||
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.3
|
||||
const std::string& getObjectText() const { return mObjText; }
|
||||
void setObjectText(const std::string &utf8string) { mObjText = utf8string; }
|
||||
|
||||
enum EObjectTextFilter { OTF_NONE, OTF_HUD_ATTACHMENTS };
|
||||
static void refreshAllObjectText(EObjectTextFilter eObjFilter = OTF_NONE);
|
||||
// [/RLVa:KB]
|
||||
protected:
|
||||
LLHUDText(const U8 type);
|
||||
|
||||
|
|
@ -161,6 +168,9 @@ private:
|
|||
ETextAlignment mTextAlignment;
|
||||
EVertAlignment mVertAlignment;
|
||||
BOOL mHidden;
|
||||
// [RLVa:KB] - Checked: RLVa-1.0.0
|
||||
std::string mObjText;
|
||||
// [/RLVa:KB]
|
||||
|
||||
static BOOL sDisplayText ;
|
||||
static std::set<LLPointer<LLHUDText> > sTextObjects;
|
||||
|
|
|
|||
|
|
@ -69,7 +69,10 @@
|
|||
#include "message.h"
|
||||
#include "llviewerregion.h"
|
||||
#include "llcorehttputil.h"
|
||||
|
||||
// [RLVa:KB] - Checked: 2013-05-10 (RLVa-1.4.9)
|
||||
#include "rlvactions.h"
|
||||
#include "rlvcommon.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
const static std::string ADHOC_NAME_SUFFIX(" Conference");
|
||||
|
||||
|
|
@ -3612,6 +3615,20 @@ public:
|
|||
{
|
||||
return;
|
||||
}
|
||||
// [RLVa:KB] - Checked: 2010-11-30 (RLVa-1.3.0)
|
||||
if ( (RlvActions::hasBehaviour(RLV_BHVR_RECVIM)) || (RlvActions::hasBehaviour(RLV_BHVR_RECVIMFROM)) )
|
||||
{
|
||||
if (gAgent.isInGroup(session_id)) // Group chat: don't accept the invite if not an exception
|
||||
{
|
||||
if (!RlvActions::canReceiveIM(session_id))
|
||||
return;
|
||||
}
|
||||
else if (!RlvActions::canReceiveIM(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;
|
||||
|
|
|
|||
|
|
@ -38,6 +38,11 @@
|
|||
#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 "rlvactions.h"
|
||||
#include "rlvhandler.h"
|
||||
#include "lltoolpie.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
// Linden libraries
|
||||
#include "llbutton.h" // setLabel(), not virtual!
|
||||
|
|
@ -358,6 +363,10 @@ void LLInspectObject::updateButtons(LLSelectNode* nodep)
|
|||
|| (parent && parent->flagHandleTouch()))
|
||||
{
|
||||
getChild<LLUICtrl>("touch_btn")->setVisible(true);
|
||||
// [RLVa:KB] - Checked: 2010-11-12 (RLVa-1.2.1g) | Added: RLVa-1.2.1g
|
||||
if (rlv_handler_t::isEnabled())
|
||||
getChild<LLUICtrl>("touch_btn")->setEnabled(gRlvHandler.canTouch(object));
|
||||
// [/RLVa:KB]
|
||||
updateTouchLabel(nodep);
|
||||
}
|
||||
else if ( enable_object_open() )
|
||||
|
|
@ -387,6 +396,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()) && (RlvActions::canSit(pick.getObject(), pick.mObjectOffset)) );
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
}
|
||||
|
||||
void LLInspectObject::updateTouchLabel(LLSelectNode* nodep)
|
||||
|
|
@ -482,10 +500,15 @@ 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();
|
||||
// std::string creator_url =
|
||||
// LLSLURL("agent", creator_id, "about").getSLURLString();
|
||||
// [RLVa:KB] - Checked: RLVa-1.2.2
|
||||
// Only anonymize the creator if they're also the owner or if they're a nearby avie
|
||||
bool fRlvHideCreator = (!RlvActions::canShowName(RlvActions::SNC_DEFAULT, creator_id)) && ((nodep->mPermissions->getOwner() == creator_id) || (RlvUtil::isNearbyAgent(creator_id)));
|
||||
const std::string creator_url = LLSLURL("agent", creator_id, (!fRlvHideCreator) ? "about" : "rlvanonym").getSLURLString();
|
||||
// [/RLVa:KB]
|
||||
args["[CREATOR]"] = creator_url;
|
||||
|
||||
|
||||
// created by one user but owned by another
|
||||
std::string owner_url;
|
||||
LLUUID owner_id;
|
||||
|
|
@ -498,7 +521,11 @@ void LLInspectObject::updateCreator(LLSelectNode* nodep)
|
|||
else
|
||||
{
|
||||
owner_id = nodep->mPermissions->getOwner();
|
||||
owner_url = LLSLURL("agent", owner_id, "about").getSLURLString();
|
||||
// owner_url = LLSLURL("agent", owner_id, "about").getSLURLString();
|
||||
// [RLVa:KB] - Checked: RLVa-1.2.2
|
||||
bool fRlvHideOwner = (!RlvActions::canShowName(RlvActions::SNC_DEFAULT, owner_id));
|
||||
owner_url = LLSLURL("agent", owner_id, (!fRlvHideOwner) ? "about" : "rlvanonym").getSLURLString();
|
||||
// [/RLVa:KB]
|
||||
}
|
||||
args["[OWNER]"] = owner_url;
|
||||
|
||||
|
|
|
|||
|
|
@ -35,6 +35,9 @@
|
|||
#include "llui.h"
|
||||
#include "lluictrl.h"
|
||||
#include "llurlaction.h"
|
||||
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.2a)
|
||||
#include "rlvhandler.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// LLInspectRemoteObject
|
||||
|
|
@ -66,6 +69,9 @@ private:
|
|||
LLUUID mOwnerID;
|
||||
std::string mSLurl;
|
||||
std::string mName;
|
||||
// [RLVa:KB] - Checked: 2010-11-02 (RLVa-1.2.2a) | Added: RLVa-1.2.2a
|
||||
bool mRlvHideNames;
|
||||
// [/RLVa:KB]
|
||||
bool mGroupOwned;
|
||||
};
|
||||
|
||||
|
|
@ -75,6 +81,9 @@ LLInspectRemoteObject::LLInspectRemoteObject(const LLSD& sd) :
|
|||
mOwnerID(NULL),
|
||||
mSLurl(""),
|
||||
mName(""),
|
||||
// [RLVa:KB] - Checked: 2010-11-02 (RLVa-1.2.2a) | Added: RLVa-1.2.2a
|
||||
mRlvHideNames(false),
|
||||
// [/RLVa:KB]
|
||||
mGroupOwned(false)
|
||||
{
|
||||
}
|
||||
|
|
@ -107,6 +116,10 @@ void LLInspectRemoteObject::onOpen(const LLSD& data)
|
|||
mOwnerID = data["owner_id"].asUUID();
|
||||
mGroupOwned = data["group_owned"].asBoolean();
|
||||
mSLurl = data["slurl"].asString();
|
||||
// [RLVa:KB] - Checked: 2010-11-02 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
|
||||
if (data.has("rlv_shownames"))
|
||||
mRlvHideNames = data["rlv_shownames"].asBoolean();
|
||||
// [/RLVa:KB]
|
||||
|
||||
// update the inspector with the current object state
|
||||
update();
|
||||
|
|
@ -160,7 +173,10 @@ void LLInspectRemoteObject::update()
|
|||
}
|
||||
else
|
||||
{
|
||||
owner = LLSLURL("agent", mOwnerID, "about").getSLURLString();
|
||||
// owner = LLSLURL("agent", mOwnerID, "about").getSLURLString();
|
||||
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
|
||||
owner = LLSLURL("agent", mOwnerID, (!mRlvHideNames) ? "about" : "rlvanonym").getSLURLString();
|
||||
// [/RLVa:KB]
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -182,6 +198,14 @@ void LLInspectRemoteObject::update()
|
|||
|
||||
// disable the Block button if we don't have the object ID (will this ever happen?)
|
||||
getChild<LLUICtrl>("block_btn")->setEnabled(!mObjectID.isNull() && !LLMuteList::getInstance()->isMuted(mObjectID));
|
||||
|
||||
// [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]
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -79,6 +79,11 @@
|
|||
#include "llwearableitemslist.h"
|
||||
#include "lllandmarkactions.h"
|
||||
#include "llpanellandmarks.h"
|
||||
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1)
|
||||
#include "rlvactions.h"
|
||||
#include "rlvhandler.h"
|
||||
#include "rlvlocks.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
|
|
@ -842,6 +847,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);
|
||||
|
|
@ -1892,6 +1911,13 @@ BOOL LLItemBridge::isItemRenameable() const
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
// [RLVa:KB] - Checked: 2011-03-29 (RLVa-1.3.0g) | Modified: RLVa-1.3.0g
|
||||
if ( (rlv_handler_t::isEnabled()) && (!RlvFolderLocks::instance().canRenameItem(mUUID)) )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
return (item->getPermissions().allowModifyBy(gAgent.getID()));
|
||||
}
|
||||
return FALSE;
|
||||
|
|
@ -2528,6 +2554,14 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// [RLVa:KB] - Checked: 2011-03-29 (RLVa-1.3.0g) | Added: RLVa-1.3.0g
|
||||
if ( (is_movable) && (rlv_handler_t::isEnabled()) && (RlvFolderLocks::instance().hasLockedFolder(RLV_LOCK_ANY)) )
|
||||
{
|
||||
is_movable = RlvFolderLocks::instance().canMoveFolder(cat_id, mUUID);
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
//
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
|
|
@ -3962,6 +3996,13 @@ void LLFolderBridge::buildContextMenuFolderOptions(U32 flags, menuentry_vec_t&
|
|||
{
|
||||
disabled_items.push_back(std::string("Replace Outfit"));
|
||||
}
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.3
|
||||
// Block "Replace Current Outfit" if the user can't wear the new folder
|
||||
if ( (RlvActions::isRlvEnabled()) && (RlvFolderLocks::instance().isLockedFolder(mUUID, RLV_LOCK_ADD)) )
|
||||
{
|
||||
disabled_items.push_back(std::string("Replace Outfit"));
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
if (!LLAppearanceMgr::instance().getCanAddToCOF(mUUID))
|
||||
{
|
||||
disabled_items.push_back(std::string("Add To Outfit"));
|
||||
|
|
@ -4547,6 +4588,24 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
|
|||
{
|
||||
is_movable = FALSE;
|
||||
}
|
||||
|
||||
// [RLVa:KB] - Checked: 2011-03-29 (RLVa-1.3.0g) | Modified: RLVa-1.3.0g
|
||||
if ( (rlv_handler_t::isEnabled()) && (is_movable) )
|
||||
{
|
||||
if (move_is_into_current_outfit)
|
||||
{
|
||||
// RELEASE-RLVa: [RLVa-1.3.0] Keep sync'ed with code below => LLAppearanceMgr::wearItemOnAvatar() with "replace == true"
|
||||
const LLViewerInventoryItem* pItem = dynamic_cast<const LLViewerInventoryItem*>(inv_item);
|
||||
is_movable = rlvPredCanWearItem(pItem, RLV_WEAR_REPLACE);
|
||||
}
|
||||
if (is_movable)
|
||||
{
|
||||
is_movable = (!RlvFolderLocks::instance().hasLockedFolder(RLV_LOCK_ANY)) ||
|
||||
(RlvFolderLocks::instance().canMoveItem(inv_item->getUUID(), mUUID));
|
||||
}
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
if (move_is_into_trash)
|
||||
{
|
||||
is_movable &= inv_item->getIsLinkType() || !get_is_item_worn(inv_item->getUUID());
|
||||
|
|
@ -5360,6 +5419,16 @@ void LLCallingCardBridge::performAction(LLInventoryModel* model, std::string act
|
|||
{
|
||||
callingcard_name = av_name.getCompleteName();
|
||||
}
|
||||
|
||||
// [RLVa:KB] - Checked: 2013-05-08 (RLVa-1.4.9)
|
||||
if (!RlvActions::canStartIM(item->getCreatorUUID()))
|
||||
{
|
||||
make_ui_sound("UISndInvalidOp");
|
||||
RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_STARTIM, LLSD().with("RECIPIENT", LLSLURL("agent", item->getCreatorUUID(), "completename").getSLURLString()));
|
||||
return;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
LLUUID session_id = gIMMgr->addSession(callingcard_name, IM_NOTHING_SPECIAL, item->getCreatorUUID());
|
||||
if (session_id != LLUUID::null)
|
||||
{
|
||||
|
|
@ -5969,6 +6038,21 @@ std::string LLObjectBridge::getLabelSuffix() const
|
|||
|
||||
void rez_attachment(LLViewerInventoryItem* item, LLViewerJointAttachment* attachment, bool replace)
|
||||
{
|
||||
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1)
|
||||
// If no attachment point was specified, try looking it up from the item name
|
||||
static LLCachedControl<bool> fRlvDeprecateAttachPt(gSavedSettings, "RLVaDebugDeprecateExplicitPoint", false);
|
||||
if ( (rlv_handler_t::isEnabled()) && (!fRlvDeprecateAttachPt) &&
|
||||
(!attachment) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_ANY)) )
|
||||
{
|
||||
attachment = RlvAttachPtLookup::getAttachPoint(item);
|
||||
}
|
||||
|
||||
if ( (RlvActions::isRlvEnabled()) && (!rlvPredCanWearItem(item, (replace) ? RLV_WEAR_REPLACE : RLV_WEAR_ADD)) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
const LLUUID& item_id = item->getLinkedUUID();
|
||||
|
||||
// Check for duplicate request.
|
||||
|
|
@ -6001,10 +6085,24 @@ void rez_attachment(LLViewerInventoryItem* item, LLViewerJointAttachment* attach
|
|||
if (replace &&
|
||||
(attachment && attachment->getNumObjects() > 0))
|
||||
{
|
||||
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1)
|
||||
// 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.0)
|
||||
// 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*/);
|
||||
}
|
||||
}
|
||||
|
|
@ -6078,6 +6176,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())
|
||||
{
|
||||
|
|
@ -6096,6 +6198,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
|
||||
|
|
@ -6340,18 +6453,36 @@ 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
|
||||
{
|
||||
items.push_back(std::string("Wearable And Object Wear"));
|
||||
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]
|
||||
}
|
||||
|
||||
if (LLWearableType::getAllowMultiwear(mWearableType))
|
||||
{
|
||||
items.push_back(std::string("Wearable Add"));
|
||||
if (!gAgentWearables.canAddWearable(mWearableType))
|
||||
// if (!gAgentWearables.canAddWearable(mWearableType))
|
||||
// [SL:KB] - Patch: Appearance-WearableDuplicateAssets | Checked: 2011-07-24 (Catznip-2.6.0e) | Added: Catznip-2.6.0e
|
||||
if ( (!gAgentWearables.canAddWearable(mWearableType)) || (gAgentWearables.getWearableFromAssetID(item->getAssetUUID())) )
|
||||
// [/SL:KB]
|
||||
{
|
||||
disabled_items.push_back(std::string("Wearable Add"));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,6 +86,10 @@
|
|||
#include "llviewerwindow.h"
|
||||
#include "llvoavatarself.h"
|
||||
#include "llwearablelist.h"
|
||||
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1a)
|
||||
#include "rlvhandler.h"
|
||||
#include "rlvlocks.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
|
|
@ -628,6 +632,14 @@ BOOL get_is_item_removable(const LLInventoryModel* model, const LLUUID& id)
|
|||
}
|
||||
}
|
||||
|
||||
// [RLVa:KB] - Checked: 2011-03-29 (RLVa-1.3.0g) | Modified: RLVa-1.3.0g
|
||||
if ( (rlv_handler_t::isEnabled()) &&
|
||||
(RlvFolderLocks::instance().hasLockedFolder(RLV_LOCK_ANY)) && (!RlvFolderLocks::instance().canRemoveItem(id)) )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
const LLInventoryObject *obj = model->getItem(id);
|
||||
if (obj && obj->getIsLinkType())
|
||||
{
|
||||
|
|
@ -656,6 +668,14 @@ BOOL get_is_category_removable(const LLInventoryModel* model, const LLUUID& id)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
// [RLVa:KB] - Checked: 2011-03-29 (RLVa-1.3.0g) | Modified: RLVa-1.3.0g
|
||||
if ( ((rlv_handler_t::isEnabled()) &&
|
||||
(RlvFolderLocks::instance().hasLockedFolder(RLV_LOCK_ANY)) && (!RlvFolderLocks::instance().canRemoveFolder(id))) )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
if (!isAgentAvatarValid()) return FALSE;
|
||||
|
||||
const LLInventoryCategory* category = model->getCategory(id);
|
||||
|
|
@ -691,6 +711,13 @@ BOOL get_is_category_renameable(const LLInventoryModel* model, const LLUUID& id)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
// [RLVa:KB] - Checked: 2011-03-29 (RLVa-1.3.0g) | Modified: RLVa-1.3.0g
|
||||
if ( (rlv_handler_t::isEnabled()) && (model == &gInventory) && (!RlvFolderLocks::instance().canRenameFolder(id)) )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
LLViewerInventoryCategory* cat = model->getCategory(id);
|
||||
|
||||
if (cat && !LLFolderType::lookupIsProtectedType(cat->getPreferredType()) &&
|
||||
|
|
|
|||
|
|
@ -58,6 +58,10 @@
|
|||
#include "bufferarray.h"
|
||||
#include "bufferstream.h"
|
||||
#include "llcorehttputil.h"
|
||||
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1a)
|
||||
#include "rlvhandler.h"
|
||||
#include "rlvlocks.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
//#define DIFF_INVENTORY_FILES
|
||||
#ifdef DIFF_INVENTORY_FILES
|
||||
|
|
@ -715,11 +719,19 @@ void LLInventoryModel::collectDescendents(const LLUUID& id,
|
|||
collectDescendentsIf(id, cats, items, include_trash, always);
|
||||
}
|
||||
|
||||
//void LLInventoryModel::collectDescendentsIf(const LLUUID& id,
|
||||
// cat_array_t& cats,
|
||||
// item_array_t& items,
|
||||
// BOOL include_trash,
|
||||
// LLInventoryCollectFunctor& add)
|
||||
// [RLVa:KB] - Checked: 2013-04-15 (RLVa-1.4.8)
|
||||
void LLInventoryModel::collectDescendentsIf(const LLUUID& id,
|
||||
cat_array_t& cats,
|
||||
item_array_t& items,
|
||||
BOOL include_trash,
|
||||
LLInventoryCollectFunctor& add)
|
||||
LLInventoryCollectFunctor& add,
|
||||
bool follow_folder_links)
|
||||
// [/RLVa:KB]
|
||||
{
|
||||
// Start with categories
|
||||
if(!include_trash)
|
||||
|
|
@ -739,7 +751,10 @@ void LLInventoryModel::collectDescendentsIf(const LLUUID& id,
|
|||
{
|
||||
cats.push_back(cat);
|
||||
}
|
||||
collectDescendentsIf(cat->getUUID(), cats, items, include_trash, add);
|
||||
// [RLVa:KB] - Checked: 2013-04-15 (RLVa-1.4.8)
|
||||
collectDescendentsIf(cat->getUUID(), cats, items, include_trash, add, follow_folder_links);
|
||||
// [/RLVa:KB]
|
||||
// collectDescendentsIf(cat->getUUID(), cats, items, include_trash, add);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -759,6 +774,44 @@ void LLInventoryModel::collectDescendentsIf(const LLUUID& id,
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// [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']
|
||||
// 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.
|
||||
if (follow_folder_links && item_array)
|
||||
{
|
||||
S32 count = item_array->size();
|
||||
for(S32 i = 0; i < count; ++i)
|
||||
{
|
||||
item = item_array->at(i);
|
||||
if (item && item->getActualType() == LLAssetType::AT_LINK_FOLDER)
|
||||
{
|
||||
LLViewerInventoryCategory *linked_cat = item->getLinkedCategory();
|
||||
if (linked_cat && linked_cat->getPreferredType() != LLFolderType::FT_OUTFIT)
|
||||
// BAP - was
|
||||
// LLAssetType::lookupIsEnsembleCategoryType(linked_cat->getPreferredType()))
|
||||
// Change back once ensemble typing is in place.
|
||||
{
|
||||
if(add(linked_cat,NULL))
|
||||
{
|
||||
// BAP should this be added here? May not
|
||||
// matter if it's only being used in current
|
||||
// outfit traversal.
|
||||
cats.push_back(LLPointer<LLViewerInventoryCategory>(linked_cat));
|
||||
}
|
||||
collectDescendentsIf(linked_cat->getUUID(), cats, items, include_trash, add, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
}
|
||||
|
||||
U32 LLInventoryModel::getDescendentsCountRecursive(const LLUUID& id, U32 max_item_limit)
|
||||
|
|
@ -3024,6 +3077,14 @@ void LLInventoryModel::processSaveAssetIntoInventory(LLMessageSystem* msg,
|
|||
LL_INFOS() << "LLInventoryModel::processSaveAssetIntoInventory item"
|
||||
" not found: " << item_id << LL_ENDL;
|
||||
}
|
||||
|
||||
// [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();
|
||||
|
|
@ -3085,6 +3146,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
|
||||
|
|
|
|||
|
|
@ -249,11 +249,19 @@ public:
|
|||
cat_array_t& categories,
|
||||
item_array_t& items,
|
||||
BOOL include_trash);
|
||||
// [RLVa:KB] - Checked: 2013-04-15 (RLVa-1.4.8)
|
||||
void collectDescendentsIf(const LLUUID& id,
|
||||
cat_array_t& categories,
|
||||
item_array_t& items,
|
||||
BOOL include_trash,
|
||||
LLInventoryCollectFunctor& add);
|
||||
LLInventoryCollectFunctor& add,
|
||||
bool follow_folder_links = false);
|
||||
// [/RLVa:KB]
|
||||
// void collectDescendentsIf(const LLUUID& id,
|
||||
// cat_array_t& categories,
|
||||
// item_array_t& items,
|
||||
// BOOL include_trash,
|
||||
// LLInventoryCollectFunctor& add);
|
||||
|
||||
// Collect all items in inventory that are linked to item_id.
|
||||
// Assumes item_id is itself not a linked item.
|
||||
|
|
|
|||
|
|
@ -50,6 +50,10 @@
|
|||
#include "llviewerattachmenu.h"
|
||||
#include "llviewerfoldertype.h"
|
||||
#include "llvoavatarself.h"
|
||||
// [RLVa:KB] - Checked: 2013-05-08 (RLVa-1.4.9)
|
||||
#include "rlvactions.h"
|
||||
#include "rlvcommon.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
static LLDefaultChildRegistry::Register<LLInventoryPanel> r("inventory_panel");
|
||||
|
||||
|
|
@ -1105,7 +1109,11 @@ bool LLInventoryPanel::beginIMSession()
|
|||
std::string name;
|
||||
|
||||
std::vector<LLUUID> members;
|
||||
EInstantMessage type = IM_SESSION_CONFERENCE_START;
|
||||
// EInstantMessage type = IM_SESSION_CONFERENCE_START;
|
||||
|
||||
// [RLVa:KB] - Checked: 2013-05-08 (RLVa-1.4.9)
|
||||
bool fRlvCanStartIM = true;
|
||||
// [/RLVa:KB]
|
||||
|
||||
std::set<LLFolderViewItem*>::const_iterator iter;
|
||||
for (iter = selected_items.begin(); iter != selected_items.end(); iter++)
|
||||
|
|
@ -1144,10 +1152,17 @@ bool LLInventoryPanel::beginIMSession()
|
|||
for(S32 i = 0; i < count; ++i)
|
||||
{
|
||||
id = item_array.at(i)->getCreatorUUID();
|
||||
if(at.isBuddyOnline(id))
|
||||
// [RLVa:KB] - Checked: 2013-05-08 (RLVa-1.4.9)
|
||||
if ( (at.isBuddyOnline(id)) && (members.end() == std::find(members.begin(), members.end(), id)) )
|
||||
{
|
||||
fRlvCanStartIM &= RlvActions::canStartIM(id);
|
||||
members.push_back(id);
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
// if(at.isBuddyOnline(id))
|
||||
// {
|
||||
// members.push_back(id);
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1164,10 +1179,17 @@ bool LLInventoryPanel::beginIMSession()
|
|||
LLAvatarTracker& at = LLAvatarTracker::instance();
|
||||
LLUUID id = inv_item->getCreatorUUID();
|
||||
|
||||
if(at.isBuddyOnline(id))
|
||||
// [RLVa:KB] - Checked: 2013-05-08 (RLVa-1.4.9)
|
||||
if ( (at.isBuddyOnline(id)) && (members.end() == std::find(members.begin(), members.end(), id)) )
|
||||
{
|
||||
fRlvCanStartIM &= RlvActions::canStartIM(id);
|
||||
members.push_back(id);
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
// if(at.isBuddyOnline(id))
|
||||
// {
|
||||
// members.push_back(id);
|
||||
// }
|
||||
}
|
||||
} //if IT_CALLINGCARD
|
||||
} //if !IT_CATEGORY
|
||||
|
|
@ -1177,16 +1199,34 @@ bool LLInventoryPanel::beginIMSession()
|
|||
// the session_id is randomly generated UUID which will be replaced later
|
||||
// with a server side generated number
|
||||
|
||||
// [RLVa:KB] - Checked: 2013-05-08 (RLVa-1.4.9)
|
||||
if (!fRlvCanStartIM)
|
||||
{
|
||||
make_ui_sound("UISndInvalidOp");
|
||||
RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_STARTCONF);
|
||||
return true;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
if (name.empty())
|
||||
{
|
||||
name = LLTrans::getString("conference-title");
|
||||
}
|
||||
|
||||
LLUUID session_id = gIMMgr->addSession(name, type, members[0], members);
|
||||
if (session_id != LLUUID::null)
|
||||
// [RLVa:KB] - Checked: 2011-04-11 (RLVa-1.3.0h) | Added: RLVa-1.3.0h
|
||||
if (!members.empty())
|
||||
{
|
||||
LLFloaterIMContainer::getInstance()->showConversation(session_id);
|
||||
if (members.size() > 1)
|
||||
LLAvatarActions::startConference(members);
|
||||
else
|
||||
LLAvatarActions::startIM(members[0]);
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
// LLUUID session_id = gIMMgr->addSession(name, type, members[0], members);
|
||||
// if (session_id != LLUUID::null)
|
||||
// {
|
||||
// LLFloaterIMContainer::getInstance()->showConversation(session_id);
|
||||
// }
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -1274,8 +1314,11 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open)
|
|||
active_inv_floaterp->setMinimized(FALSE);
|
||||
}
|
||||
}
|
||||
else if (auto_open)
|
||||
// else if (auto_open)
|
||||
// [RLVa:KB] - Checked: 2012-05-15 (RLVa-1.4.6)
|
||||
else if ( (auto_open) && (LLFloaterReg::canShowInstance(floater_inventory->getInstanceName())) )
|
||||
{
|
||||
// [/RLVa:KB]
|
||||
floater_inventory->openFloater();
|
||||
|
||||
res = inventory_panel->getActivePanel();
|
||||
|
|
|
|||
|
|
@ -63,6 +63,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]
|
||||
|
||||
#include "llmenuoptionpathfindingrebakenavmesh.h"
|
||||
#include "llpathfindingmanager.h"
|
||||
|
|
@ -633,16 +636,31 @@ void LLLocationInputCtrl::reshape(S32 width, S32 height, BOOL called_from_parent
|
|||
|
||||
void LLLocationInputCtrl::onInfoButtonClicked()
|
||||
{
|
||||
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.4.5) | Added: RLVa-1.2.0
|
||||
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
|
||||
return;
|
||||
// [/RLVa:KB]
|
||||
|
||||
LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "agent"));
|
||||
}
|
||||
|
||||
void LLLocationInputCtrl::onForSaleButtonClicked()
|
||||
{
|
||||
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.4.5) | Added: RLVa-1.2.0
|
||||
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
|
||||
return;
|
||||
// [/RLVa:KB]
|
||||
|
||||
handle_buy_land();
|
||||
}
|
||||
|
||||
void LLLocationInputCtrl::onAddLandmarkButtonClicked()
|
||||
{
|
||||
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.4.5) | Added: RLVa-1.2.0
|
||||
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())
|
||||
|
|
@ -770,6 +788,10 @@ void LLLocationInputCtrl::onTextEditorRightClicked(S32 x, S32 y, MASK mask)
|
|||
|
||||
void LLLocationInputCtrl::refresh()
|
||||
{
|
||||
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.4.5) | Added: RLVa-1.2.0
|
||||
mInfoBtn->setEnabled(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC));
|
||||
// [/RLVa:KB]
|
||||
|
||||
refreshLocation(); // update location string
|
||||
refreshParcelIcons();
|
||||
updateAddLandmarkButton(); // indicate whether current parcel has been landmarked
|
||||
|
|
@ -1047,6 +1069,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.4.5) | Added: RLVa-1.2.0
|
||||
mAddLandmarkBtn->setVisible(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC));
|
||||
// [/RLVa:KB]
|
||||
enableAddLandmarkButton(LLLandmarkActions::hasParcelLandmark());
|
||||
}
|
||||
void LLLocationInputCtrl::updateAddLandmarkTooltip()
|
||||
|
|
@ -1076,6 +1101,9 @@ void LLLocationInputCtrl::updateContextMenu(){
|
|||
{
|
||||
landmarkItem->setLabel(LLTrans::getString("EditLandmarkNavBarMenu"));
|
||||
}
|
||||
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.4.5) | Added: RLVa-1.2.0
|
||||
landmarkItem->setEnabled(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC));
|
||||
// [/RLVa:KB]
|
||||
}
|
||||
}
|
||||
void LLLocationInputCtrl::updateWidgetlayout()
|
||||
|
|
@ -1131,17 +1159,23 @@ void LLLocationInputCtrl::onLocationContextMenuItemClicked(const LLSD& userdata)
|
|||
}
|
||||
else if (item == "landmark")
|
||||
{
|
||||
LLViewerInventoryItem* landmark = LLLandmarkActions::findLandmarkForAgentPos();
|
||||
|
||||
if(!landmark)
|
||||
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.4.5) | Added: RLVa-1.2.0
|
||||
if (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
|
||||
{
|
||||
LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "create_landmark"));
|
||||
}
|
||||
else
|
||||
{
|
||||
LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "landmark").with("id",landmark->getUUID()));
|
||||
|
||||
// [/RLVa:KB]
|
||||
LLViewerInventoryItem* landmark = LLLandmarkActions::findLandmarkForAgentPos();
|
||||
|
||||
if(!landmark)
|
||||
{
|
||||
LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "create_landmark"));
|
||||
}
|
||||
else
|
||||
{
|
||||
LLFloaterSidePanelContainer::showPanel("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")
|
||||
{
|
||||
|
|
|
|||
|
|
@ -109,6 +109,10 @@ public:
|
|||
LLLineEditor* getTextEntry() const { return mTextEntry; }
|
||||
void handleLoginComplete();
|
||||
|
||||
// [RLVa:KB] - Checked: 2014-03-23 (RLVa-1.4.10)
|
||||
void refresh();
|
||||
// [/RLVa:KB]
|
||||
|
||||
private:
|
||||
|
||||
enum EParcelIcon
|
||||
|
|
@ -135,7 +139,7 @@ private:
|
|||
* depending on whether current parcel has been landmarked.
|
||||
*/
|
||||
void enableAddLandmarkButton(bool val);
|
||||
void refresh();
|
||||
// void refresh();
|
||||
void refreshLocation();
|
||||
void refreshParcelIcons();
|
||||
// Refresh the value in the health percentage text field
|
||||
|
|
|
|||
|
|
@ -62,6 +62,9 @@
|
|||
#include "pipeline.h"
|
||||
#include "llviewershadermgr.h"
|
||||
#include "lltrans.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
|
||||
|
|
|
|||
|
|
@ -50,6 +50,9 @@
|
|||
#include "llviewerparcelmgr.h"
|
||||
#include "llviewerregion.h"
|
||||
#include "lltooltip.h"
|
||||
// [RLVa:KB] - Checked: 2010-03-07 (RLVa-1.2.0c)
|
||||
#include "rlvactions.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
//
|
||||
// Constants
|
||||
|
|
@ -140,7 +143,10 @@ BOOL LLFloaterMove::postBuild()
|
|||
|
||||
initMovementMode();
|
||||
|
||||
gAgent.addParcelChangedCallback(LLFloaterMove::sUpdateFlyingStatus);
|
||||
// gAgent.addParcelChangedCallback(LLFloaterMove::sUpdateFlyingStatus);
|
||||
// [RLVa:KB] - Checked: 2011-05-27 (RLVa-1.4.0a) | Added: RLVa-1.4.0a
|
||||
gAgent.addParcelChangedCallback(LLFloaterMove::sUpdateMovementStatus);
|
||||
// [/RLVa:KB]
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
@ -325,23 +331,32 @@ void LLFloaterMove::setMovementMode(const EMovementMode mode)
|
|||
{
|
||||
case MM_RUN:
|
||||
gAgent.setAlwaysRun();
|
||||
gAgent.setRunning();
|
||||
// gAgent.setRunning();
|
||||
break;
|
||||
case MM_WALK:
|
||||
gAgent.clearAlwaysRun();
|
||||
gAgent.clearRunning();
|
||||
// gAgent.clearRunning();
|
||||
break;
|
||||
default:
|
||||
//do nothing for other modes (MM_FLY)
|
||||
break;
|
||||
}
|
||||
// tell the simulator.
|
||||
gAgent.sendWalkRun(gAgent.getAlwaysRun());
|
||||
|
||||
updateButtonsWithMovementMode(mode);
|
||||
// gAgent.sendWalkRun(gAgent.getAlwaysRun());
|
||||
//
|
||||
// updateButtonsWithMovementMode(mode);
|
||||
//
|
||||
// bool bHideModeButtons = MM_FLY == mode
|
||||
// || (isAgentAvatarValid() && gAgentAvatarp->isSitting());
|
||||
// [RLVa:KB] - Checked: 2011-05-11 (RLVa-1.3.0i) | Added: RLVa-1.3.0i
|
||||
// Running may have been restricted so update walk-vs-run from the agent's actual running state
|
||||
if ( (MM_WALK == mode) || (MM_RUN == mode) )
|
||||
mCurrentMode = (gAgent.getRunning()) ? MM_RUN : MM_WALK;
|
||||
|
||||
bool bHideModeButtons = MM_FLY == mode
|
||||
|| (isAgentAvatarValid() && gAgentAvatarp->isSitting());
|
||||
updateButtonsWithMovementMode(mCurrentMode);
|
||||
|
||||
bool bHideModeButtons = (MM_FLY == mCurrentMode) || (isAgentAvatarValid() && gAgentAvatarp->isSitting());
|
||||
// [/RLVa:KB]
|
||||
|
||||
showModeButtons(!bHideModeButtons);
|
||||
|
||||
|
|
@ -444,12 +459,23 @@ void LLFloaterMove::setModeTitle(const EMovementMode mode)
|
|||
}
|
||||
|
||||
//static
|
||||
void LLFloaterMove::sUpdateFlyingStatus()
|
||||
//void LLFloaterMove::sUpdateFlyingStatus()
|
||||
//{
|
||||
// LLFloaterMove *floater = LLFloaterReg::findTypedInstance<LLFloaterMove>("moveview");
|
||||
// if (floater) floater->mModeControlButtonMap[MM_FLY]->setEnabled(gAgent.canFly());
|
||||
//
|
||||
//}
|
||||
// [RLVa:KB] - Checked: 2011-05-27 (RLVa-1.4.0a) | Added: RLVa-1.4.0a
|
||||
void LLFloaterMove::sUpdateMovementStatus()
|
||||
{
|
||||
LLFloaterMove *floater = LLFloaterReg::findTypedInstance<LLFloaterMove>("moveview");
|
||||
if (floater) floater->mModeControlButtonMap[MM_FLY]->setEnabled(gAgent.canFly());
|
||||
|
||||
LLFloaterMove* pFloater = LLFloaterReg::findTypedInstance<LLFloaterMove>("moveview");
|
||||
if (pFloater)
|
||||
{
|
||||
pFloater->mModeControlButtonMap[MM_RUN]->setEnabled(!RlvActions::hasBehaviour(RLV_BHVR_ALWAYSRUN));
|
||||
pFloater->mModeControlButtonMap[MM_FLY]->setEnabled(gAgent.canFly());
|
||||
}
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
void LLFloaterMove::showModeButtons(BOOL bShow)
|
||||
{
|
||||
|
|
@ -489,7 +515,10 @@ void LLFloaterMove::onOpen(const LLSD& key)
|
|||
showModeButtons(FALSE);
|
||||
}
|
||||
|
||||
sUpdateFlyingStatus();
|
||||
// sUpdateFlyingStatus();
|
||||
// [RLVa:KB] - Checked: 2011-05-27 (RLVa-1.4.0a) | Added: RLVa-1.4.0a
|
||||
sUpdateMovementStatus();
|
||||
// [/RLVa:KB]
|
||||
}
|
||||
|
||||
void LLFloaterMove::setModeButtonToggleState(const EMovementMode mode)
|
||||
|
|
@ -680,10 +709,17 @@ LLPanelStandStopFlying* LLPanelStandStopFlying::getStandStopFlyingPanel()
|
|||
|
||||
void LLPanelStandStopFlying::onStandButtonClick()
|
||||
{
|
||||
LLFirstUse::sit(false);
|
||||
// [RLVa:KB] - Checked: 2010-03-07 (RLVa-1.2.0c) | Added: RLVa-1.2.0a
|
||||
if ( (!RlvActions::isRlvEnabled()) || (RlvActions::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.
|
||||
|
|
|
|||
|
|
@ -59,7 +59,10 @@ public:
|
|||
static void enableInstance(BOOL bEnable);
|
||||
/*virtual*/ void onOpen(const LLSD& key);
|
||||
|
||||
static void sUpdateFlyingStatus();
|
||||
// static void sUpdateFlyingStatus();
|
||||
// [RLVa:KB] - Checked: 2011-05-27 (RLVa-1.4.0a) | Added: RLVa-1.4.0a
|
||||
static void sUpdateMovementStatus();
|
||||
// [/RLVa:KB]
|
||||
|
||||
protected:
|
||||
void turnLeft();
|
||||
|
|
|
|||
|
|
@ -699,6 +699,15 @@ void LLNavigationBar::resizeLayoutPanel()
|
|||
nav_bar_rect.setLeftTopAndSize(nav_bar_rect.mLeft, nav_bar_rect.mTop, nav_panel_width, nav_bar_rect.getHeight());
|
||||
mNavigationPanel->handleReshape(nav_bar_rect,true);
|
||||
}
|
||||
|
||||
// [RLVa:KB] - Checked: 2014-03-23 (RLVa-1.4.10)
|
||||
void LLNavigationBar::refreshLocationCtrl()
|
||||
{
|
||||
if (mCmbLocation)
|
||||
mCmbLocation->refresh();
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
void LLNavigationBar::invokeSearch(std::string search_text)
|
||||
{
|
||||
LLFloaterReg::showInstance("search", LLSD().with("category", "all").with("query", LLSD(search_text)));
|
||||
|
|
|
|||
|
|
@ -102,6 +102,9 @@ public:
|
|||
int getDefNavBarHeight();
|
||||
int getDefFavBarHeight();
|
||||
|
||||
// [RLVa:KB] - Checked: 2014-03-23 (RLVa-1.4.10)
|
||||
void refreshLocationCtrl();
|
||||
// [/RLVa:KB]
|
||||
private:
|
||||
// the distance between navigation panel and favorites panel in pixels
|
||||
const static S32 FAVBAR_TOP_PADDING = 10;
|
||||
|
|
|
|||
|
|
@ -60,6 +60,10 @@
|
|||
#include "llviewerwindow.h"
|
||||
#include "llworld.h"
|
||||
#include "llworldmapview.h" // shared draw code
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.1
|
||||
#include "rlvactions.h"
|
||||
#include "rlvcommon.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
static LLDefaultChildRegistry::Register<LLNetMap> r1("net_map");
|
||||
|
||||
|
|
@ -350,7 +354,10 @@ void LLNetMap::draw()
|
|||
|
||||
pos_map = globalPosToView(positions[i]);
|
||||
|
||||
bool show_as_friend = (LLAvatarTracker::instance().getBuddyInfo(uuid) != NULL);
|
||||
// [RLVa:KB] - Checked: RLVa-1.2.0
|
||||
bool show_as_friend = (LLAvatarTracker::instance().getBuddyInfo(uuid) != NULL) && (RlvActions::canShowName(RlvActions::SNC_DEFAULT, uuid));
|
||||
// [/RLVa:KB]
|
||||
// bool show_as_friend = (LLAvatarTracker::instance().getBuddyInfo(uuid) != NULL);
|
||||
|
||||
LLColor4 color = show_as_friend ? map_avatar_friend_color : map_avatar_color;
|
||||
|
||||
|
|
@ -602,11 +609,20 @@ BOOL LLNetMap::handleToolTip( S32 x, S32 y, MASK mask )
|
|||
|
||||
// If the cursor is near an avatar on the minimap, a mini-inspector will be
|
||||
// shown for the avatar, instead of the normal map tooltip.
|
||||
if (handleToolTipAgent(mClosestAgentToCursor))
|
||||
// if (handleToolTipAgent(mClosestAgentToCursor))
|
||||
// [RLVa:KB] - Checked: RLVa-1.2.2
|
||||
bool fRlvCanShowName = (mClosestAgentToCursor.notNull()) && (RlvActions::canShowName(RlvActions::SNC_DEFAULT, mClosestAgentToCursor));
|
||||
if ( (fRlvCanShowName) && (handleToolTipAgent(mClosestAgentToCursor)) )
|
||||
// [/RLVa:KB]
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// [RLVa:KB] - Checked: RLVa-1.2.2
|
||||
LLStringUtil::format_map_t args; LLAvatarName avName;
|
||||
args["[AGENT]"] = ( (!fRlvCanShowName) && (mClosestAgentToCursor.notNull()) && (LLAvatarNameCache::get(mClosestAgentToCursor, &avName)) ) ? RlvStrings::getAnonym(avName) + "\n" : "";
|
||||
// [/RLVa:KB]
|
||||
|
||||
LLRect sticky_rect;
|
||||
std::string region_name;
|
||||
LLViewerRegion* region = LLWorld::getInstance()->getRegionFromPosGlobal( viewPosToGlobal( x, y ) );
|
||||
|
|
@ -618,14 +634,17 @@ BOOL LLNetMap::handleToolTip( S32 x, S32 y, MASK mask )
|
|||
sticky_rect.mRight = sticky_rect.mLeft + 2 * SLOP;
|
||||
sticky_rect.mTop = sticky_rect.mBottom + 2 * SLOP;
|
||||
|
||||
region_name = region->getName();
|
||||
// region_name = region->getName();
|
||||
// [RLVa:KB] - Checked: RLVa-1.2.2
|
||||
region_name = (RlvActions::canShowLocation()) ? region->getName() : RlvStrings::getString(RLV_STRING_HIDDEN_REGION);
|
||||
// [/RLVa:KB]
|
||||
if (!region_name.empty())
|
||||
{
|
||||
region_name += "\n";
|
||||
}
|
||||
}
|
||||
|
||||
LLStringUtil::format_map_t args;
|
||||
// LLStringUtil::format_map_t args;
|
||||
args["[REGION]"] = region_name;
|
||||
std::string msg = mToolTipMsg;
|
||||
LLStringUtil::format(msg, args);
|
||||
|
|
|
|||
|
|
@ -38,6 +38,10 @@
|
|||
|
||||
#include "lltoastalertpanel.h"
|
||||
|
||||
// [RLVa:KB] - Checked: 2013-05-09 (RLVa-1.4.9)
|
||||
#include "rlvactions.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
using namespace LLNotificationsUI;
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
|
@ -88,8 +92,19 @@ bool LLAlertHandler::processNotification(const LLNotificationPtr& notification)
|
|||
|
||||
LLUUID from_id = notification->getPayload()["from_id"];
|
||||
|
||||
// firstly create session...
|
||||
LLHandlerUtil::spawnIMSession(name, from_id);
|
||||
// [RLVa:KB] - Checked: 2013-05-09 (RLVa-1.4.9)
|
||||
// Don't spawn an IM session for non-chat related events:
|
||||
// - LLHandlerUtil::logToIMP2P() below will still be called with to_file_only == false
|
||||
// - LLHandlerUtil::logToIM() will eventually be called as a result and without an open IM session it will log the
|
||||
// same message as it would for an open session whereas to_file_only == true would take a different code path
|
||||
if (RlvActions::canStartIM(from_id))
|
||||
{
|
||||
// [/RLVa:KB]
|
||||
// firstly create session...
|
||||
LLHandlerUtil::spawnIMSession(name, from_id);
|
||||
// [RLVa:KB] - Checked: 2013-05-09 (RLVa-1.4.9)
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
// ...then log message to have IM Well notified about new message
|
||||
LLHandlerUtil::logToIMP2P(notification);
|
||||
|
|
|
|||
|
|
@ -332,16 +332,23 @@ public:
|
|||
*/
|
||||
static void updateIMFLoaterMesages(const LLUUID& session_id);
|
||||
|
||||
/**
|
||||
* Updates messages of visible IM floater.
|
||||
*/
|
||||
static void updateVisibleIMFLoaterMesages(const LLNotificationPtr& notification);
|
||||
// /**
|
||||
// * Updates messages of visible IM floater.
|
||||
// */
|
||||
// static void updateVisibleIMFLoaterMesages(const LLNotificationPtr& notification);
|
||||
|
||||
/**
|
||||
* Decrements counter of IM messages.
|
||||
*/
|
||||
static void decIMMesageCounter(const LLNotificationPtr& notification);
|
||||
|
||||
// [SL:KB] - Patch: UI-Notifications | Checked: 2011-04-11 (Catznip-2.5.0a) | Added: Catznip-2.5.0a
|
||||
/**
|
||||
* Checks whether the user has opted to embed (certain) notifications in IM sessions
|
||||
*/
|
||||
static bool canEmbedNotificationInIM(const LLNotificationPtr& notification);
|
||||
// [/SL:KB]
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -265,15 +265,15 @@ void LLHandlerUtil::updateIMFLoaterMesages(const LLUUID& session_id)
|
|||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void LLHandlerUtil::updateVisibleIMFLoaterMesages(const LLNotificationPtr& notification)
|
||||
{
|
||||
const std::string name = LLHandlerUtil::getSubstitutionName(notification);
|
||||
LLUUID from_id = notification->getPayload()["from_id"];
|
||||
LLUUID session_id = spawnIMSession(name, from_id);
|
||||
|
||||
updateIMFLoaterMesages(session_id);
|
||||
}
|
||||
//// static
|
||||
//void LLHandlerUtil::updateVisibleIMFLoaterMesages(const LLNotificationPtr& notification)
|
||||
//{
|
||||
// const std::string name = LLHandlerUtil::getSubstitutionName(notification);
|
||||
// LLUUID from_id = notification->getPayload()["from_id"];
|
||||
// LLUUID session_id = spawnIMSession(name, from_id);
|
||||
//
|
||||
// updateIMFLoaterMesages(session_id);
|
||||
//}
|
||||
|
||||
// static
|
||||
void LLHandlerUtil::decIMMesageCounter(const LLNotificationPtr& notification)
|
||||
|
|
|
|||
|
|
@ -36,6 +36,9 @@
|
|||
#include "llscriptfloater.h"
|
||||
#include "llimview.h"
|
||||
#include "llnotificationsutil.h"
|
||||
// [RLVa:KB] - Checked: 2013-05-09 (RLVa-1.4.9)
|
||||
#include "rlvactions.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
using namespace LLNotificationsUI;
|
||||
|
||||
|
|
@ -108,9 +111,21 @@ bool LLOfferHandler::processNotification(const LLNotificationPtr& notification)
|
|||
notification->playSound();
|
||||
}
|
||||
|
||||
LLHandlerUtil::spawnIMSession(name, from_id);
|
||||
LLHandlerUtil::addNotifPanelToIM(notification);
|
||||
|
||||
// [RLVa:KB] - Checked: 2013-05-09 (RLVa-1.4.9)
|
||||
// Don't spawn an IM session for non-chat related events
|
||||
if (RlvActions::canStartIM(from_id))
|
||||
{
|
||||
// [/RLVa:KB]
|
||||
LLHandlerUtil::spawnIMSession(name, from_id);
|
||||
LLHandlerUtil::addNotifPanelToIM(notification);
|
||||
// [RLVa:KB] - Checked: 2013-05-09 (RLVa-1.4.9)
|
||||
}
|
||||
else
|
||||
{
|
||||
// Since we didn't add this notification to an IM session we want it to get routed to the notification syswell
|
||||
add_notif_to_im = false;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
}
|
||||
|
||||
if (!notification->canShowToast())
|
||||
|
|
@ -177,9 +192,18 @@ bool LLOfferHandler::processNotification(const LLNotificationPtr& notification)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (notification->canLogToIM()
|
||||
&& notification->hasFormElements()
|
||||
&& !LLHandlerUtil::isIMFloaterOpened(notification))
|
||||
// if (notification->canLogToIM()
|
||||
// && notification->hasFormElements()
|
||||
// && !LLHandlerUtil::isIMFloaterOpened(notification))
|
||||
// [SL:KB] - Patch: UI-Notifications | Checked: 2013-05-09 (Catznip-3.5)
|
||||
// The above test won't necessarily tell us whether the notification went into an IM or to the notification syswell
|
||||
// -> 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.get());
|
||||
LLToast* pToast = (pChannel) ? pChannel->getToastByNotificationID(notification->getID()) : NULL;
|
||||
if ( (pToast) && (!pToast->getCanBeStored()) )
|
||||
// [/SL:KB]
|
||||
{
|
||||
LLHandlerUtil::decIMMesageCounter(notification);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,6 +32,10 @@
|
|||
#include "llinventoryfunctions.h"
|
||||
#include "llinventorymodel.h"
|
||||
#include "llviewerinventory.h"
|
||||
// [RLVa:KB] - Checked: 2012-07-08 (RLVa-1.4.7)
|
||||
#include "rlvcommon.h"
|
||||
#include "rlvhandler.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
//virtual
|
||||
bool LLPanelAppearanceTab::canTakeOffSelected()
|
||||
|
|
@ -46,6 +50,11 @@ bool LLPanelAppearanceTab::canTakeOffSelected()
|
|||
LLViewerInventoryItem* item = gInventory.getItem(*it);
|
||||
if (!item) continue;
|
||||
|
||||
// [RLVa:KB] - Checked: 2012-07-08 (RLVa-1.4.7)
|
||||
if ( (rlv_handler_t::isEnabled()) && (rlvPredCanNotRemoveItem(item)) )
|
||||
return false;
|
||||
// [/RLVa:KB]
|
||||
|
||||
if (is_worn(NULL, item)) return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue