Assorted DN and RLVa fixes from Phoenix

This commit is contained in:
siana
2011-01-01 06:37:56 +01:00
parent 5c79220049
commit d65a5ffeb7
26 changed files with 377 additions and 148 deletions

View File

@@ -334,7 +334,15 @@ void LLAvatarNameCache::processName(const LLUUID& agent_id,
{
if (add_to_cache)
{
sCache[agent_id] = av_name;
// sCache[agent_id] = av_name;
// [SL:KB] - Patch: Agent-DisplayNames | Checked: 2010-12-28 (Catznip-2.4.0h) | Added: Catznip-2.4.0h
// Don't replace existing entries with dummies
cache_t::iterator itName = (av_name.mIsDummy) ? sCache.find(agent_id) : sCache.end();
if (sCache.end() != itName)
itName->second.mExpires = av_name.mExpires;
else
sCache[agent_id] = av_name;
// [/SL:KB]
}
sPendingQueue.erase(agent_id);
@@ -592,14 +600,14 @@ void LLAvatarNameCache::buildLegacyName(const std::string& full_name,
av_name->mIsDummy = true;
av_name->mExpires = F64_MAX;
// [Ansariel]
// [Ansariel/Henri]
// Why ain't those set? In case of disabled display names
// we would have to parse LLAvatarName::mDisplayName to get
// first and lastname if we need them. So do it already here
// for convenience.
std::istringstream fname(full_name);
fname >> av_name->mLegacyFirstName >> av_name->mLegacyLastName;
// [/Ansariel]
// [/Ansariel/Henri]
}
// fills in av_name if it has it in the cache, even if expired (can check expiry time)

View File

@@ -33,17 +33,6 @@
<integer>1</integer>
</map>
<key>OptionShowGroupNameInChatIM</key>
<map>
<key>Comment</key>
<string>Show group name in IM notification</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>BeauchampUseInventoryLinks</key>
<map>
<key>Comment</key>

View File

@@ -316,7 +316,7 @@ static BOOL gDoDisconnect = FALSE;
static std::string gLaunchFileOnQuit;
// Used on Win32 for other apps to identify our window (eg, win_setup)
const char* const VIEWER_WINDOW_CLASSNAME = "SingularityViewer";
const char* const VIEWER_WINDOW_CLASSNAME = "Second Life"; // Don't change
//----------------------------------------------------------------------------
// File scope definitons

View File

@@ -745,6 +745,12 @@ void LLAvatarTracker::processTerminateFriendship(LLMessageSystem* msg, void**)
}
}
void LLAvatarTracker::updateFriends()
{
mModifyMask |= LLFriendObserver::ADD | LLFriendObserver::REMOVE;
notifyObservers();
}
///----------------------------------------------------------------------------
/// Tracking Data
///----------------------------------------------------------------------------

View File

@@ -153,6 +153,8 @@ public:
static void formFriendship(const LLUUID& friend_id);
void updateFriends();
protected:
void deleteTrackingData();
void agentFound(const LLUUID& prey,

View File

@@ -106,9 +106,24 @@ void LLFloaterDisplayName::onOpen()
// display as "July 18 12:17 PM"
// std::string next_update_string =
// next_update_local.toHTTPDateString("%B %d %I:%M %p");
std::string next_update_string = next_update_local.asString();
getChild<LLUICtrl>("lockout_text")->setTextArg("[TIME]", next_update_string);
std::string year = next_update_local.asString().substr(0,4);
std::string month = next_update_local.asString().substr(5,2);
std::string day = next_update_local.asString().substr(8,2);
std::string hour = next_update_local.asString().substr(11,2);
std::string minute = next_update_local.asString().substr(14,2);
std::string second = next_update_local.asString().substr(17,2);
std::string next_update_string_date =
llformat("%s/%s/%s",year.c_str(),month.c_str(),
day.c_str());
std::string next_update_string_time =
llformat("%s:%s:%s",hour.c_str(),minute.c_str(),
second.c_str());
getChild<LLUICtrl>("lockout_text")->setTextArg("[DATE]",
next_update_string_date);
getChild<LLUICtrl>("lockout_text")->setTextArg("[TIME]",
next_update_string_time);
getChild<LLUICtrl>("lockout_text")->setVisible(true);
getChild<LLUICtrl>("no_lockout_text")->setVisible(false);
getChild<LLUICtrl>("save_btn")->setEnabled(false);
getChild<LLUICtrl>("display_name_editor")->setEnabled(false);
getChild<LLUICtrl>("display_name_confirm")->setEnabled(false);
@@ -118,6 +133,7 @@ void LLFloaterDisplayName::onOpen()
else
{
getChild<LLUICtrl>("lockout_text")->setVisible(false);
getChild<LLUICtrl>("no_lockout_text")->setVisible(true);
getChild<LLUICtrl>("save_btn")->setEnabled(true);
getChild<LLUICtrl>("display_name_editor")->setEnabled(true);
getChild<LLUICtrl>("display_name_confirm")->setEnabled(true);
@@ -230,3 +246,4 @@ void LLFloaterDisplayName::onSave(void* data)
self->setVisible(false);
}

View File

@@ -43,6 +43,12 @@
#include "llagent.h"
#include "llappviewer.h" // for gLastVersionChannel
// [Ansariel: Display name support]
#include "llavatarname.h"
#include "llavatarnamecache.h"
// [/Ansariel: Display name support]
#include "llfloateravatarpicker.h"
#include "llviewerwindow.h"
#include "llbutton.h"
@@ -418,7 +424,25 @@ BOOL LLPanelFriends::addFriend(const LLUUID& agent_id)
bool isOnline = relationInfo->isOnline();
std::string fullname;
BOOL have_name = gCacheName->getFullName(agent_id, fullname);
// [Ansariel: Display name support]
//BOOL have_name = gCacheName->getFullName(agent_id, fullname);
LLAvatarName avatar_name;
BOOL have_name;
if (LLAvatarNameCache::get(agent_id, &avatar_name))
{
static LLCachedControl<S32> phoenix_name_system("PhoenixNameSystem", 0);
switch (phoenix_name_system)
{
case 0 : fullname = avatar_name.getLegacyName(); break;
case 1 : fullname = (avatar_name.mIsDisplayNameDefault ? avatar_name.mDisplayName : avatar_name.getCompleteName()); break;
case 2 : fullname = avatar_name.mDisplayName; break;
default : fullname = avatar_name.getCompleteName(); break;
}
have_name = TRUE;
}
else have_name = FALSE;
// [/Ansariel: Display name support]
LLSD element;
element["id"] = agent_id;
@@ -499,9 +523,27 @@ BOOL LLPanelFriends::updateFriendItem(const LLUUID& agent_id, const LLRelationsh
bool isOnlineSIP = LLVoiceClient::getInstance()->isOnlineSIP(itemp->getUUID());
bool isOnline = info->isOnline();
std::string fullname;
BOOL have_name = gCacheName->getFullName(agent_id, fullname);
std::string fullname;
// [Ansariel: Display name support]
//BOOL have_name = gCacheName->getFullName(agent_id, fullname);
LLAvatarName avatar_name;
BOOL have_name;
if (LLAvatarNameCache::get(agent_id, &avatar_name))
{
static LLCachedControl<S32> phoenix_name_system("PhoenixNameSystem", 0);
switch (phoenix_name_system)
{
case 0 : fullname = avatar_name.getLegacyName(); break;
case 1 : fullname = (avatar_name.mIsDisplayNameDefault ? avatar_name.mDisplayName : avatar_name.getCompleteName()); break;
case 2 : fullname = avatar_name.mDisplayName; break;
default : fullname = avatar_name.getCompleteName(); break;
}
have_name = TRUE;
}
else have_name = FALSE;
// [/Ansariel: Display name support]
// Name of the status icon to use
std::string statusIcon;
@@ -861,12 +903,20 @@ void LLPanelFriends::onClickIM(void* user_data)
{
LLUUID agent_id = ids[0];
const LLRelationship* info = LLAvatarTracker::instance().getBuddyInfo(agent_id);
std::string fullname;
if(info && gCacheName->getFullName(agent_id, fullname))
// [Ansariel: Display name support]
//std::string fullname;
//if(info && gCacheName->getFullName(agent_id, fullname))
//{
// gIMMgr->setFloaterOpen(TRUE);
// gIMMgr->addSession(fullname, IM_NOTHING_SPECIAL, agent_id);
//}
LLAvatarName avatar_name;
if (info && LLAvatarNameCache::get(agent_id, &avatar_name))
{
gIMMgr->setFloaterOpen(TRUE);
gIMMgr->addSession(fullname, IM_NOTHING_SPECIAL, agent_id);
}
gIMMgr->addSession(avatar_name.getLegacyName(),IM_NOTHING_SPECIAL,agent_id);
}
// [/Ansariel: Display name support]
}
else
{
@@ -983,12 +1033,30 @@ void LLPanelFriends::onClickRemove(void* user_data)
if(ids.size() == 1)
{
LLUUID agent_id = ids[0];
std::string first, last;
if(gCacheName->getName(agent_id, first, last))
// [Ansariel: Display name support]
//std::string first, last;
//if(gCacheName->getName(agent_id, first, last))
//{
// args["FIRST_NAME"] = first;
// args["LAST_NAME"] = last;
//}
LLAvatarName avatar_name;
if (LLAvatarNameCache::get(agent_id, &avatar_name))
{
args["FIRST_NAME"] = first;
args["LAST_NAME"] = last;
std::string fullname;
static LLCachedControl<S32> phoenix_name_system("PhoenixNameSystem", 0);
switch (phoenix_name_system)
{
case 0 : fullname = avatar_name.getLegacyName(); break;
case 1 : fullname = (avatar_name.mIsDisplayNameDefault ? avatar_name.mDisplayName : avatar_name.getCompleteName()); break;
case 2 : fullname = avatar_name.mDisplayName; break;
default : fullname = avatar_name.getCompleteName(); break;
}
args["NAME"] = fullname;
}
// [/Ansariel: Display name support]
}
else
{
@@ -1224,12 +1292,29 @@ void LLPanelFriends::confirmModifyRights(rights_map_t& ids, EGrantRevoke command
if(ids.size() == 1)
{
LLUUID agent_id = ids.begin()->first;
std::string first, last;
if(gCacheName->getName(agent_id, first, last))
//std::string first, last;
//if(gCacheName->getName(agent_id, first, last))
//{
// args["FIRST_NAME"] = first;
// args["LAST_NAME"] = last;
//}
LLAvatarName avatar_name;
if (LLAvatarNameCache::get(agent_id, &avatar_name))
{
args["FIRST_NAME"] = first;
args["LAST_NAME"] = last;
std::string fullname;
static LLCachedControl<S32> phoenix_name_system("PhoenixNameSystem", 0);
switch (phoenix_name_system)
{
case 0 : fullname = avatar_name.getLegacyName(); break;
case 1 : fullname = (avatar_name.mIsDisplayNameDefault ? avatar_name.mDisplayName : avatar_name.getCompleteName()); break;
case 2 : fullname = avatar_name.mDisplayName; break;
default : fullname = avatar_name.getCompleteName(); break;
}
args["NAME"] = fullname;
}
if (command == GRANT)
{
LLNotifications::instance().add("GrantModifyRights",

View File

@@ -1618,13 +1618,42 @@ void LLFloaterIMPanel::addHistoryLine(const std::string &utf8msg, const LLColor4
}
else
{
std::string show_name = name;
LLAvatarName avatar_name;
if ((LLUUID::null != source) &&
LLAvatarNameCache::get(source, &avatar_name))
{
static LLCachedControl<S32> phoenix_name_system("PhoenixNameSystem", 0);
switch (phoenix_name_system)
{
case 0 : show_name = avatar_name.getCompleteName(); break;
case 1 : show_name = (avatar_name.mIsDisplayNameDefault ? avatar_name.mDisplayName : avatar_name.getCompleteName()); break;
case 2 : show_name = avatar_name.mDisplayName; break;
default : show_name = avatar_name.getCompleteName(); break;
}
}
// Convert the name to a hotlink and add to message.
const LLStyleSP &source_style = LLStyleMap::instance().lookupAgent(source);
mHistoryEditor->appendStyledText(name,false,prepend_newline,source_style);
mHistoryEditor->appendStyledText(show_name,false,prepend_newline,source_style);
}
prepend_newline = false;
}
mHistoryEditor->appendColoredText(utf8msg, false, prepend_newline, color);
//Kadah - Bold group mods chat. Doesnt work on the first msg of the session, dont have speakers list yet?
if (isModerator(source))
{
mHistoryEditor->appendColoredText(utf8msg.substr(0,1), false, prepend_newline, color);
LLStyleSP style(new LLStyle);
style->setVisible(true);
style->setColor(color);
style->setFontName(LLStringUtil::null);
style->mBold = TRUE;
mHistoryEditor->appendStyledText(utf8msg.substr(1), false, prepend_newline, style);
}
else
{
mHistoryEditor->appendColoredText(utf8msg, false, prepend_newline, color);
}
if (log_to_file
&& gSavedPerAccountSettings.getBOOL("LogInstantMessages") )
@@ -2522,3 +2551,14 @@ bool LLFloaterIMPanel::onConfirmForceCloseError(const LLSD& notification, const
}
//Kadah
const bool LLFloaterIMPanel::isModerator(const LLUUID& speaker_id)
{
if (mSpeakers)
{
LLPointer<LLSpeaker> speakerp = mSpeakers->findSpeaker(speaker_id);
return speakerp && speakerp->mIsModerator;
}
return FALSE;
}

View File

@@ -304,6 +304,8 @@ private:
void removeTypingIndicator(const LLIMInfo* im_info);
void sendTypingState(BOOL typing);
const bool isModerator(const LLUUID& speaker_id);
private:
LLLineEditor* mInputEditor;

View File

@@ -201,7 +201,9 @@ struct LLWearInfo
};
BOOL gAddToOutfit = FALSE;
// [RLVa:KB] - Made this part of LLWearableHoldingPattern
//BOOL gAddToOutfit = FALSE;
// [/RLVa:KB]
// +=================================================+
// | LLInvFVBridge |
@@ -1616,8 +1618,8 @@ BOOL LLFolderBridge::isUpToDate() const
}
// <edit> trying to make it stop trying to fetch Local Inventory
//return category->getVersion() != LLViewerInventoryCategory::VERSION_UNKNOWN;
return (category->getVersion() != LLViewerInventoryCategory::VERSION_UNKNOWN) || (mUUID == gSystemFolderRoot) || (gInventory.isObjectDescendentOf(mUUID, gSystemFolderRoot));
return category->getVersion() != LLViewerInventoryCategory::VERSION_UNKNOWN;
//return (category->getVersion() != LLViewerInventoryCategory::VERSION_UNKNOWN) || (mUUID == gSystemFolderRoot) || (gInventory.isObjectDescendentOf(mUUID, gSystemFolderRoot));
// </edit>
}
@@ -3203,13 +3205,13 @@ void open_texture(const LLUUID& item_id,
const LLUUID& source_id,
BOOL take_focus)
{
// [RLVa:KB] - Checked: 2009-11-11 (RLVa-1.1.0a) | Modified: RLVa-1.1.0a
if (gRlvHandler.hasBehaviour(RLV_BHVR_VIEWTEXTURE))
{
RlvNotifications::notifyBlockedViewTexture();
return;
}
// [/RLVa:KB]
// See if we can bring an exiting preview to the front
if( !LLPreview::show( item_id, take_focus ) )
@@ -3419,14 +3421,6 @@ void open_landmark(LLViewerInventoryItem* inv_item,
const LLUUID& source_id,
BOOL take_focus)
{
// [RLVa:KB] - Checked: 2009-11-11 (RLVa-1.1.0a) | Modified: RLVa-1.1.0a
if (gRlvHandler.hasBehaviour(RLV_BHVR_VIEWTEXTURE))
{
RlvNotifications::notifyBlockedViewTexture();
return;
}
// [/RLVa:KB]
// See if we can bring an exiting preview to the front
if( !LLPreview::show( inv_item->getUUID(), take_focus ) )
{
@@ -4116,8 +4110,8 @@ void LLObjectBridge::performAction(LLFolderView* folder, LLInventoryModel* model
}
else if ("edit" == action)
{
//if (gRlvHandler.hasBehaviour(RLV_BHVR_EDIT))
// return;
if (gRlvHandler.hasBehaviour(RLV_BHVR_EDIT))
return;
LLVOAvatar* avatarp = gAgent.getAvatarObject();
if (!avatarp)
return;
@@ -5037,7 +5031,10 @@ void wear_inventory_category_on_avatar_step2( BOOL proceed, void* userdata )
// [RLVa:KB] - Checked: 2010-03-05 (RLVa-1.2.0z) | Modified: RLVa-1.2.0b
// Filter out any new attachments that can't be worn before adding them
if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_ANY)) )
obj_items_new.erase(std::remove_if(obj_items_new.begin(), obj_items_new.end(), RlvPredCanNotWearItem(RLV_WEAR_REPLACE)), obj_items_new.end());
obj_items_new.erase(std::remove_if(obj_items_new.begin(), obj_items_new.end(),
RlvPredCanNotWearItem(RLV_WEAR_ADD)), obj_items_new.end());
for (S32 idxObjNew = 0; idxObjNew < obj_items_new.count(); idxObjNew++)
RlvAttachmentLockWatchdog::instance().onWearAttachment(obj_items_new.get(idxObjNew).get() , RLV_WEAR_ADD);
obj_items.insert(obj_items.end(), obj_items_new.begin(), obj_items_new.end());
// [/RLVa:KB]
@@ -5118,7 +5115,7 @@ void wear_inventory_category_on_avatar_step3(LLWearableHoldingPattern* holder, B
if( wearable && ((S32)wearable->getType() == i) )
{
LLViewerInventoryItem* item;
item = (LLViewerInventoryItem*)gInventory.getItem(data->mItemID);
item = (LLViewerInventoryItem*)gInventory.getLinkedItem(data->mItemID);
if( item && (item->getAssetUUID() == wearable->getID()) )
{
//RN: after discussing with Brashears, I disabled this code

View File

@@ -1640,7 +1640,8 @@ void LLInventoryModel::bulkFetch(std::string url)
if (cat)
{
// <edit> Pre-emptive strike
if(!(gInventory.isObjectDescendentOf(cat->getUUID(), gSystemFolderRoot)))
//if(!(gInventory.isObjectDescendentOf(cat->getUUID(), gSystemFolderRoot)))
if(true)
{
// </edit>
if ( LLViewerInventoryCategory::VERSION_UNKNOWN == cat->getVersion())
@@ -3858,11 +3859,9 @@ bool LLInventoryCollectFunctor::itemTransferCommonlyAllowed(LLInventoryItem* ite
switch(item->getType())
{
// <edit> I don't even think changing this did anything
//case LLAssetType::AT_CALLINGCARD:
// // not allowed
// break;
// </edit>
case LLAssetType::AT_CALLINGCARD:
// not allowed
break;
case LLAssetType::AT_OBJECT:
my_avatar = gAgent.getAvatarObject();

View File

@@ -1203,12 +1203,12 @@ void LLPanelAvatarPicks::processAvatarPicksReply(LLMessageSystem* msg, void**)
// static
void LLPanelAvatarPicks::onClickNew(void* data)
{
// [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a)
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
{
return;
}
// [/RLVa:KB]
LLPanelAvatarPicks* self = (LLPanelAvatarPicks*)data;
LLPanelPick* panel_pick = new LLPanelPick(FALSE);
LLTabContainer* tabs = self->getChild<LLTabContainer>("picks tab");
@@ -1224,12 +1224,6 @@ void LLPanelAvatarPicks::onClickNew(void* data)
//Pick import and export - RK
void LLPanelAvatarPicks::onClickImport(void* data)
{
// [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a)
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
{
return;
}
// [/RLVa:KB]
LLPanelAvatarPicks* self = (LLPanelAvatarPicks*)data;
LLPanelPick* panel_pick = new LLPanelPick(FALSE);
LLTabContainer* tabs = self->getChild<LLTabContainer>("picks tab");

View File

@@ -46,6 +46,7 @@
#include "llviewerregion.h"
#include "llavatarnamecache.h"
#include "llvoavatar.h"
#include "llcallingcard.h"
LLPanelGeneral::LLPanelGeneral()
{
@@ -128,7 +129,9 @@ void LLPanelGeneral::apply()
if(gAgent.getRegion()){
if(namesystem_combobox->getCurrentIndex()<=0 || namesystem_combobox->getCurrentIndex()>2) LLAvatarNameCache::setUseDisplayNames(false);
else LLAvatarNameCache::setUseDisplayNames(true);
//LLVOAvatar::invalidateNameTags(); No need, they'll be updated on the next loop
LLVOAvatar::invalidateNameTags(); // Remove all clienttags to get them updated
LLAvatarTracker::instance().updateFriends();
}
}

View File

@@ -1698,7 +1698,11 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
to_id.isNull() )
do_auto_response = false;
if( do_auto_response )
// if( do_auto_response )
// [RLVa:KB] - Alternate: Phoenix-370
// Phoenix specific: auto-response should be blocked if the avie is RLV @sendim=n restricted and the recipient is not an exception
if ( (do_auto_response) && ( (!gRlvHandler.hasBehaviour(RLV_BHVR_SENDIM)) || (gRlvHandler.isException(RLV_BHVR_SENDIM, from_id)) ) )
// [/RLVa:KB]
{
if((dialog == IM_NOTHING_SPECIAL && !is_auto_response) ||
(dialog == IM_TYPING_START && gSavedPerAccountSettings.getBOOL("AscentInstantMessageAnnounceIncoming"))
@@ -2371,7 +2375,17 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
position,
true);
chat.mText = std::string("IM: ") + name + separator_string + saved + message.substr(message_offset);
if (gAgent.isInGroup(session_id)&& gSavedSettings.getBOOL("OptionShowGroupNameInChatIM"))
{
prepend_msg = "[";
prepend_msg += std::string((char*)binary_bucket);
prepend_msg += "] ";
}
else
{
prepend_msg = std::string("IM: ");
}
chat.mText = prepend_msg + name + separator_string + saved + message.substr(message_offset);
LLFloaterChat::addChat(chat, TRUE, is_this_agent);
}
break;
@@ -2462,11 +2476,22 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
case IM_LURE_USER:
{
if (is_muted)
// [RLVa:KB] - Checked: 2010-12-11 (RLVa-1.2.2c) | Added: RLVa-1.2.2c
// If the lure sender is a specific @accepttp exception they will override muted and busy status
bool fRlvSummon = (rlv_handler_t::isEnabled()) && (gRlvHandler.isException(RLV_BHVR_ACCEPTTP, from_id));
// [/RLVa:KB]
// if (is_muted)
// [RLVa:KB] - Checked: 2010-12-11 (RLVa-1.2.2c) | Added: RLVa-1.2.2c
if ( (is_muted) && (!fRlvSummon) )
// [/RLVa:KB]
{
return;
}
else if (is_busy)
// else if (is_busy)
// [RLVa:KB] - Checked: 2010-12-11 (RLVa-1.2.2c) | Added: RLVa-1.2.2c
else if ( (is_busy) && (!fRlvSummon) )
// [/RLVa:KB]
{
busy_message(msg,from_id);
}
@@ -2475,12 +2500,11 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
// [RLVa:KB] - Checked: 2010-04-01 (RLVa-1.1.3a) | Modified: RLVa-1.0.0d
if (rlv_handler_t::isEnabled())
{
// Block if: 1) @tplure=n restricted (and sender isn't an exception), or 2) @unsit=n restricted and currently sitting
LLVOAvatar* pAvatar = gAgent.getAvatarObject();
if ( ( (gRlvHandler.hasBehaviour(RLV_BHVR_TPLURE)) && (!gRlvHandler.isException(RLV_BHVR_TPLURE, from_id)) ) ||
( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) && (pAvatar) && (pAvatar->mIsSitting) ) )
if (!gRlvHandler.canTeleportViaLure(from_id))
{
RlvUtil::sendBusyMessage(from_id, RlvStrings::getString(RLV_STRING_BLOCKED_TPLURE_REMOTE));
if (is_busy)
busy_message(msg,from_id);
return;
}
@@ -3078,7 +3102,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
{
if (CHAT_SOURCE_AGENT == chat.mSourceType)
{
chat.mFromName = RlvStrings::getAnonym(from_name);
chat.mFromName = from_name = RlvStrings::getAnonym(from_name);
chat.mRlvNamesFiltered = TRUE;
}
else if ( (!is_owned_by_me) || (!is_attachment) )

View File

@@ -77,11 +77,14 @@ LLVLComposition::LLVLComposition(LLSurface *surfacep, const U32 width, const F32
setDetailTextureID(2, TERRAIN_MOUNTAIN_DETAIL);
setDetailTextureID(3, TERRAIN_ROCK_DETAIL);
static const LLCachedControl<F32> terrain_color_start_height("TerrainColorStartHeight", 20.f);
static const LLCachedControl<F32> terrain_color_height_range("TerrainColorHeightRange", 60.f);
// Initialize the texture matrix to defaults.
for (S32 i = 0; i < CORNER_COUNT; ++i)
{
mStartHeight[i] = gSavedSettings.getF32("TerrainColorStartHeight");
mHeightRange[i] = gSavedSettings.getF32("TerrainColorHeightRange");
mStartHeight[i] = terrain_color_start_height;
mHeightRange[i] = terrain_color_height_range;
}
mTexScaleX = 16.f;
mTexScaleY = 16.f;

View File

@@ -17,6 +17,7 @@
#include "llviewerprecompiledheaders.h"
#include "llagent.h"
#include "llappviewer.h"
#include "llavatarnamecache.h"
#include "lluictrlfactory.h"
#include "llversionviewer.h"
#include "llviewermenu.h"
@@ -117,9 +118,6 @@ void RlvSettings::initClass()
if (gSavedSettings.controlExists(RLV_SETTING_SHOWNAMETAGS))
gSavedSettings.getControl(RLV_SETTING_SHOWNAMETAGS)->getSignal()->connect(boost::bind(&onChangedSettingBOOL, _1, &fShowNameTags));
if (gSavedSettings.controlExists(RLV_SETTING_AVATAROFFSET_Z))
gSavedSettings.getControl(RLV_SETTING_AVATAROFFSET_Z)->getSignal()->connect(boost::bind(&onChangedAvatarOffset, _1));
fInitialized = true;
}
}
@@ -140,13 +138,6 @@ void RlvSettings::initClass()
}
#endif // RLV_EXTENSION_STARTLOCATION
// Checked: 2010-10-11 (RLVa-1.2.0e) | Added: RLVa-1.2.0e
bool RlvSettings::onChangedAvatarOffset(const LLSD& sdValue)
{
gAgent.sendAgentSetAppearance();
return true;
}
// Checked: 2009-12-18 (RLVa-1.1.0k) | Added: RLVa-1.1.0i
bool RlvSettings::onChangedSettingBOOL(const LLSD& newvalue, BOOL* pfSetting)
{
@@ -239,9 +230,7 @@ const std::string& RlvStrings::getAnonym(const std::string& strName)
// Test with 11,264 SL names showed a 3.33% - 3.82% occurance for each so we *should* get a very even spread
for (int idx = 0, cnt = strName.length(); idx < cnt; idx++)
nHash += pszName[idx];
static const std::string empty = "";
if (m_Anonyms.size() == 0) return empty;
return m_Anonyms[nHash % m_Anonyms.size()];
}
@@ -363,18 +352,38 @@ void RlvUtil::filterLocation(std::string& strUTF8Text)
rlvStringReplace(strUTF8Text, pParcelMgr->getAgentParcelName(), RlvStrings::getString(RLV_STRING_HIDDEN_PARCEL));
}
// Checked: 2010-04-22 (RLVa-1.2.0f) | Modified: RLVa-1.2.0f
void RlvUtil::filterNames(std::string& strUTF8Text)
// Checked: 2010-12-08 (RLVa-1.2.2c) | Modified: RLVa-1.2.2c
void RlvUtil::filterNames(std::string& strUTF8Text, bool fFilterLegacy)
{
std::vector<LLUUID> idAgents;
LLWorld::getInstance()->getAvatars(&idAgents, NULL);
std::string strFullName;
for (int idxAgent = 0, cntAgent = idAgents.size(); idxAgent < cntAgent; idxAgent++)
{
// LLCacheName::getFullName() will add the UUID to the lookup queue if we don't know it yet
if (gCacheName->getFullName(idAgents[idxAgent], strFullName))
rlvStringReplace(strUTF8Text, strFullName, RlvStrings::getAnonym(strFullName));
LLAvatarName avName;
if (LLAvatarNameCache::get(idAgents[idxAgent], &avName))
{
const std::string& strAnonym = RlvStrings::getAnonym(avName.mDisplayName);
// NOTE: if the legacy first and last name are empty we get a legacy name of " " which would replace all spaces in the string
std::string strLegacyName;
if ( (fFilterLegacy) && (!avName.mIsDisplayNameDefault) && (!avName.mLegacyFirstName.empty()) )
strLegacyName = avName.getLegacyName();
// If the display name is a subset of the legacy name we need to filter that first, otherwise it's the other way around
if (std::string::npos != strLegacyName.find(avName.mDisplayName))
{
if (!strLegacyName.empty())
rlvStringReplace(strUTF8Text, strLegacyName, strAnonym);
rlvStringReplace(strUTF8Text, avName.mDisplayName, strAnonym);
}
else
{
rlvStringReplace(strUTF8Text, avName.mDisplayName, strAnonym);
if (!strLegacyName.empty())
rlvStringReplace(strUTF8Text, strLegacyName, strAnonym);
}
}
}
}

View File

@@ -67,10 +67,6 @@ inline BOOL rlvGetPerUserSettingsBOOL(const std::string& strSetting, BOOL fDefau
{
return (gSavedPerAccountSettings.controlExists(strSetting)) ? gSavedPerAccountSettings.getBOOL(strSetting) : fDefault;
}
inline BOOL rlvGetSettingF32(const std::string& strSetting, F32 nDefault)
{
return (gSavedSettings.controlExists(strSetting)) ? gSavedSettings.getF32(strSetting) : nDefault;
}
inline std::string rlvGetSettingString(const std::string& strSetting, const std::string& strDefault)
{
return (gSavedSettings.controlExists(strSetting)) ? gSavedSettings.getString(strSetting) : strDefault;
@@ -79,7 +75,6 @@ inline std::string rlvGetSettingString(const std::string& strSetting, const std:
class RlvSettings
{
public:
static F32 getAvatarOffsetZ() { return rlvGetSettingF32(RLV_SETTING_AVATAROFFSET_Z, 0.0); }
static BOOL getDebug() { return rlvGetSettingBOOL(RLV_SETTING_DEBUG, FALSE); }
static BOOL getForbidGiveToRLV() { return rlvGetSettingBOOL(RLV_SETTING_FORBIDGIVETORLV, TRUE); }
static BOOL getNoSetEnv() { return fNoSetEnv; }
@@ -107,7 +102,6 @@ public:
static void initClass();
protected:
static bool onChangedAvatarOffset(const LLSD& sdValue);
static bool onChangedSettingBOOL(const LLSD& newvalue, BOOL* pfSetting);
#ifdef RLV_EXPERIMENTAL_COMPOSITEFOLDERS
@@ -153,14 +147,14 @@ class RlvUtil
{
public:
static bool isEmote(const std::string& strUTF8Text);
static bool isNearbyAgent(const LLUUID& idAgent); // @shownames
static bool isNearbyRegion(const std::string& strRegion); // @showloc
static bool isNearbyAgent(const LLUUID& idAgent); // @shownames
static bool isNearbyRegion(const std::string& strRegion); // @showloc
static void filterLocation(std::string& strUTF8Text); // @showloc
static void filterNames(std::string& strUTF8Text); // @shownames
static void filterLocation(std::string& strUTF8Text); // @showloc
static void filterNames(std::string& strUTF8Text, bool fFilterLegacy = true); // @shownames
static bool isForceTp() { return m_fForceTp; }
static void forceTp(const LLVector3d& posDest); // Ignores restrictions that might otherwise prevent tp'ing
static void forceTp(const LLVector3d& posDest); // Ignores restrictions that might otherwise prevent tp'ing
static void notifyFailedAssertion(const std::string& strAssert, const std::string& strFile, int nLine);
@@ -170,7 +164,7 @@ public:
static bool sendChatReply(const std::string& strChannel, const std::string& strUTF8Text);
protected:
static bool m_fForceTp; // @standtp
static bool m_fForceTp; // @standtp
};
// ============================================================================

View File

@@ -57,6 +57,7 @@
// Experimental commands (not part of the RLV API spec, disabled on public releases)
#ifdef RLV_EXPERIMENTAL_CMDS
#define RLV_EXTENSION_CMD_ALLOWIDLE // Forces "Away" status when idle (effect is the same as setting AllowIdleAFK to TRUE)
#define RLV_EXTENSION_CMD_GETCOMMAND // @getcommand:<option>=<channel>
// #define RLV_EXTENSION_CMD_GETXXXNAMES // @get[add|rem]attachnames:<option>=<channel> and @get[add|rem]outfitnames=<channel>
#define RLV_EXTENSION_CMD_INTERACT // @interact=n
#define RLV_EXTENSION_CMD_TOUCHXXX // @touch:uuid=n|y, @touchworld[:<uuid>]=n|y, @touchattach[:<uuid>]=n|y, @touchud[:<uuid>]=n|y
@@ -211,6 +212,7 @@ enum ERlvBehaviour {
RLV_BHVR_GETINV, // "getinv"
RLV_BHVR_GETINVWORN, // "getinvworn"
RLV_BHVR_GETSITID, // "getsitid"
RLV_BHVR_GETCOMMAND, // "getcommand"
RLV_BHVR_GETSTATUS, // "getstatus"
RLV_BHVR_GETSTATUSALL, // "getstatusall"
@@ -282,9 +284,8 @@ enum ERlvAttachGroupType
#define RLV_SETTING_MAIN "RestrainedLove"
#define RLV_SETTING_DEBUG "RestrainedLoveDebug"
#define RLV_SETTING_AVATAROFFSET_Z "RestrainedLoveOffsetAvatarZ"
#define RLV_SETTING_FORBIDGIVETORLV "RestrainedLoveForbidGiveToRLV"
#define RLV_SETTING_NOSETENV "RestrainedLoveNoSetEnv"
#define RLV_SETTING_FORBIDGIVETORLV "RestrainedLoveForbidGiveToRLV"
#define RLV_SETTING_WEARADDPREFIX "RestrainedLoveStackWhenFolderBeginsWith"
#define RLV_SETTING_WEARREPLACEPREFIX "RestrainedLoveReplaceWhenFolderBeginsWith"

View File

@@ -90,6 +90,8 @@ bool RlvExtGetSet::processCommand(const RlvCommand& rlvCmd, ERlvCmdRet& eRet)
{
if (!gRlvHandler.hasBehaviourExcept(RLV_BHVR_SETDEBUG, rlvCmd.getObjectID()))
eRet = onSetDebug(strSetting, rlvCmd.getOption());
else
eRet = RLV_RET_FAILED_LOCK;
return true;
}
}
@@ -105,6 +107,8 @@ bool RlvExtGetSet::processCommand(const RlvCommand& rlvCmd, ERlvCmdRet& eRet)
{
if (!gRlvHandler.hasBehaviourExcept(RLV_BHVR_SETENV, rlvCmd.getObjectID()))
eRet = onSetEnv(strSetting, rlvCmd.getOption());
else
eRet = RLV_RET_FAILED_LOCK;
return true;
}
}
@@ -127,7 +131,9 @@ bool RlvExtGetSet::processCommand(const RlvCommand& rlvCmd, ERlvCmdRet& eRet)
eRet = RLV_RET_SUCCESS;
}
else
{
eRet = RLV_RET_FAILED_OPTION;
}
return true;
}
return false;

View File

@@ -15,6 +15,7 @@
*/
#include "llviewerprecompiledheaders.h"
#include "floateravatarlist.h"
#include "llavatarnamecache.h"
#include "llfloaterbeacons.h"
#include "llfloaterchat.h"
@@ -1089,6 +1090,10 @@ ERlvCmdRet RlvHandler::processAddRemCommand(const RlvCommand& rlvCmd)
// Close the "Active Speakers" panel if it's currently visible
LLFloaterChat::getInstance()->childSetVisible("active_speakers_panel", false);
// Close the "Avatar List/Radar" floater if it's currently visible
if ( (LLFloaterAvatarList::getInstance()) && (LLFloaterAvatarList::getInstance()->getVisible()) )
LLFloaterAvatarList::toggle(NULL);
}
else
{
@@ -1489,15 +1494,12 @@ ERlvCmdRet RlvHandler::processForceCommand(const RlvCommand& rlvCmd) const
break;
case RLV_BHVR_DETACHME: // @detachme=force - Checked: 2010-09-04 (RLVa-1.2.1c) | Modified: RLVa-1.2.1c
{
// NOTE: @detachme=force could be seen as a @detach:<attachpt>=force but RLV implements it as a "detach by UUID"
VERIFY_OPTION(rlvCmd.getOption().empty());
LLViewerObject* pObj = NULL; LLVOAvatar* pAvatar = NULL; LLViewerJointAttachment* pAttachPt = NULL;
if ( ((pObj = gObjectList.findObject(rlvCmd.getObjectID())) != NULL) && (pObj->isAttachment()) &&
((pAvatar = gAgent.getAvatarObject()) != NULL) &&
((pAttachPt = pAvatar->getTargetAttachmentPoint(pObj->getRootEdit())) != NULL) )
// NOTE: @detachme should respect locks but shouldn't respect things like nostrip
const LLViewerObject* pAttachObj = gObjectList.findObject(rlvCmd.getObjectID());
if ( (pAttachObj) && (pAttachObj->isAttachment()) )
{
// @detachme should respect locks but shouldn't respect things like nostrip so handle it like a manual user detach
handle_detach_from_avatar(pAttachPt);
LLVOAvatar::detachAttachmentIntoInventory(pAttachObj->getAttachmentItemID());
}
}
break;
@@ -1677,6 +1679,7 @@ ERlvCmdRet RlvHandler::processReplyCommand(const RlvCommand& rlvCmd) const
eRet = onFindFolder(rlvCmd, strReply);
break;
case RLV_BHVR_GETPATH: // @getpath[:<option>]=<channel>
case RLV_BHVR_GETPATHNEW: // @getpathnew[:<option>]=<channel>
eRet = onGetPath(rlvCmd, strReply);
break;
case RLV_BHVR_GETINV: // @getinv[:<path>]=<channel>
@@ -1700,6 +1703,16 @@ ERlvCmdRet RlvHandler::processReplyCommand(const RlvCommand& rlvCmd) const
strReply = idSitObj.asString();
}
break;
#ifdef RLV_EXTENSION_CMD_GETCOMMAND
case RLV_BHVR_GETCOMMAND: // @getcommand:<option>=<channel> - Checked: 2010-12-11 (RLVa-1.2.2c) | Added: RLVa-1.2.2c
{
RlvCommand::bhvr_map_t cmdList;
if (RlvCommand::getCommands(cmdList, rlvCmd.getOption()))
for (RlvCommand::bhvr_map_t::const_iterator itCmd = cmdList.begin(); itCmd != cmdList.end(); ++itCmd)
strReply.append("/").append(itCmd->first);
}
break;
#endif // RLV_EXTENSION_CMD_GETCOMMAND
case RLV_BHVR_GETSTATUS: // @getstatus[:<option>]=<channel> - Checked: 2009-11-26 (RLVa-1.1.0f) | Modified: RLVa-1.1.0f
{
// NOTE: specification says response should start with '/' but RLV-1.16.1 returns an empty string when no rules are set
@@ -1980,7 +1993,7 @@ ERlvCmdRet RlvHandler::onGetOutfit(const RlvCommand& rlvCmd, std::string& strRep
const EWearableType wtRlvTypes[] =
{
WT_GLOVES, WT_JACKET, WT_PANTS, WT_SHIRT, WT_SHOES, WT_SKIRT, WT_SOCKS,
WT_UNDERPANTS, WT_UNDERSHIRT, WT_SKIN, WT_EYES, WT_HAIR, WT_SHAPE
WT_UNDERPANTS, WT_UNDERSHIRT, WT_SKIN, WT_EYES, WT_HAIR, WT_SHAPE, WT_ALPHA, WT_TATTOO
};
for (int idxType = 0, cntType = sizeof(wtRlvTypes) / sizeof(EWearableType); idxType < cntType; idxType++)

View File

@@ -92,6 +92,7 @@ public:
bool canShowHoverText(LLViewerObject* pObj) const; // @showhovertext* command family
bool canSit(LLViewerObject* pObj, const LLVector3& posOffset = LLVector3::zero) const;
bool canStand() const;
bool canTeleportViaLure(const LLUUID& idAgent) const;
bool canTouch(const LLViewerObject* pObj, const LLVector3& posOffset = LLVector3::zero) const; // @touch
void filterChat(std::string& strUTF8Text, bool fFilterEmote) const; // @sendchat, @recvchat and @redirchat
bool redirectChatOrEmote(const std::string& strUTF8Test) const; // @redirchat and @rediremote
@@ -256,6 +257,12 @@ inline bool RlvHandler::canStand() const
return (!hasBehaviour(RLV_BHVR_UNSIT)) || ((gAgent.getAvatarObject()) && (!gAgent.getAvatarObject()->mIsSitting));
}
// Checked: 2010-12-11 (RLVa-1.2.2c) | Added: RLVa-1.2.2c
inline bool RlvHandler::canTeleportViaLure(const LLUUID& idAgent) const
{
return ((!hasBehaviour(RLV_BHVR_TPLURE)) || (isException(RLV_BHVR_TPLURE, idAgent))) && (canStand());
}
// Checked: 2010-04-11 (RLVa-1.2.0e) | Modified: RLVa-1.1.0l
inline bool RlvHandler::canTouch(const LLViewerObject* pObj, const LLVector3& posOffset /*=LLVector3::zero*/) const
{

View File

@@ -40,7 +40,7 @@ void wear_inventory_category_on_avatar_loop(LLWearable* wearable, void*);
// RlvCommmand
//
RlvCommand::RlvBhvrTable RlvCommand::m_BhvrMap;
RlvCommand::bhvr_map_t RlvCommand::m_BhvrMap;
// Checked: 2009-12-27 (RLVa-1.1.0k) | Modified: RLVa-1.1.0k
RlvCommand::RlvCommand(const LLUUID& idObj, const std::string& strCommand)
@@ -121,12 +121,31 @@ ERlvBehaviour RlvCommand::getBehaviourFromString(const std::string& strBhvr, boo
*pfStrict = fStrict;
RLV_ASSERT(m_BhvrMap.size() > 0);
RlvBhvrTable::const_iterator itBhvr = m_BhvrMap.find( (!fStrict) ? strBhvr : strBhvr.substr(0, idxStrict));
bhvr_map_t::const_iterator itBhvr = m_BhvrMap.find( (!fStrict) ? strBhvr : strBhvr.substr(0, idxStrict));
if ( (itBhvr != m_BhvrMap.end()) && ((!fStrict) || (hasStrictVariant(itBhvr->second))) )
return itBhvr->second;
return RLV_BHVR_UNKNOWN;
}
// Checked: 2010-12-11 (RLVa-1.2.2c) | Added: RLVa-1.2.2c
bool RlvCommand::getCommands(bhvr_map_t& cmdList, const std::string &strMatch)
{
if (strMatch.empty())
return false;
cmdList.clear();
RLV_ASSERT(m_BhvrMap.size() > 0);
for (bhvr_map_t::const_iterator itBhvr = m_BhvrMap.begin(); itBhvr != m_BhvrMap.end(); ++itBhvr)
{
std::string strCmd = itBhvr->first; ERlvBehaviour eBhvr = itBhvr->second;
if (std::string::npos != strCmd.find(strMatch))
cmdList.insert(std::pair<std::string, ERlvBehaviour>(strCmd, eBhvr));
if ( (hasStrictVariant(eBhvr)) && (std::string::npos != strCmd.append("_sec").find(strMatch)) )
cmdList.insert(std::pair<std::string, ERlvBehaviour>(strCmd, eBhvr));
}
return (0 != cmdList.size());
}
// Checked: 2010-02-27 (RLVa-1.2.0a) | Modified: RLVa-1.1.0h
void RlvCommand::initLookupTable()
{
@@ -145,7 +164,7 @@ void RlvCommand::initLookupTable()
"attachthisover", "detachthis", "attachall", "attachallover", "detachall", "attachallthis", "attachallthisover",
"detachallthis", "tpto", "version", "versionnew", "versionnum", "getattach", "getattachnames", "getaddattachnames",
"getremattachnames", "getoutfit", "getoutfitnames", "getaddoutfitnames", "getremoutfitnames", "findfolder", "findfolders",
"getpath", "getpathnew", "getinv", "getinvworn", "getsitid", "getstatus", "getstatusall"
"getpath", "getpathnew", "getinv", "getinvworn", "getsitid", "getcommand", "getstatus", "getstatusall"
};
for (int idxBvhr = 0; idxBvhr < RLV_BHVR_COUNT; idxBvhr++)
@@ -366,6 +385,7 @@ void RlvForceWear::forceFolder(const LLViewerInventoryCategory* pFolder, EWearAc
case LLAssetType::AT_CLOTHING:
if (isWearAction(eAction))
{
eCurAction = ACTION_WEAR_REPLACE; // 1.X doesn't support multi-wearables so "add" means "replace" for wearables
ERlvWearMask eWearMask = gRlvWearableLocks.canWear(pRlvItem);
if ( ((ACTION_WEAR_REPLACE == eCurAction) && (eWearMask & RLV_WEAR_REPLACE)) ||
((ACTION_WEAR_ADD == eCurAction) && (eWearMask & RLV_WEAR_ADD)) )
@@ -688,7 +708,6 @@ void RlvForceWear::remAttachment(const LLViewerObject* pAttachObj)
// Checked: 2010-08-30 (RLVa-1.1.3b) | Modified: RLVa-1.2.1c
void RlvForceWear::addWearable(const LLViewerInventoryItem* pItem, EWearAction eAction)
{
eAction = ACTION_WEAR_REPLACE; // 1.X doesn't support multi-wearables so "add" means "replace" for wearables
const LLWearable* pWearable = gAgent.getWearableFromWearableItem(pItem->getLinkedUUID());
// When replacing remove all currently worn wearables of this type *unless* the item is currently worn
if ( (ACTION_WEAR_REPLACE == eAction) && (!pWearable) )
@@ -812,7 +831,7 @@ void RlvForceWear::done()
LLViewerInventoryItem* pItem = wearItems.get(0);
if ( (pItem) && ((LLAssetType::AT_BODYPART == pItem->getType()) || (LLAssetType::AT_CLOTHING == pItem->getType())) )
{
LLFoundData* pFound = new LLFoundData(pItem->getUUID(), pItem->getAssetUUID(), pItem->getName(), pItem->getType());
LLFoundData* pFound = new LLFoundData(pItem->getLinkedUUID(), pItem->getAssetUUID(), pItem->getName(), pItem->getType());
pWearData->mFoundList.push_front(pFound);
}
}
@@ -904,6 +923,15 @@ void RlvBehaviourNotifyHandler::changed(const RlvCommand& rlvCmd, bool fInternal
default:
break;
}
// RLVa-HACK: @notify:<channel>;XXX=add will trigger itself, but shouldn't... this is a bad fix but won't create new bugs, revisit later
// -> it works since the command did succeed and will trigger RlvHandler::notifyBehaviourObservers() which in turn will trigger us
// and cause the code below to run, but meanwhile the code above will not process the @notify because it's not been added yet
if (!m_NotificationsDelayed.empty())
{
m_Notifications.insert(m_NotificationsDelayed.begin(), m_NotificationsDelayed.end());
m_NotificationsDelayed.clear();
}
}
// Checked: 2010-09-23 (RLVa-1.2.1e) | Modified: RLVa-1.2.1e

View File

@@ -59,9 +59,11 @@ public:
bool isStrict() const { return m_fStrict; }
bool isValid() const { return m_fValid; }
static ERlvBehaviour getBehaviourFromString(const std::string& strBhvr, bool* pfStrict = NULL);
static const std::string& getStringFromBehaviour(ERlvBehaviour eBhvr);
static bool hasStrictVariant(ERlvBehaviour eBhvr);
typedef std::map<std::string, ERlvBehaviour> bhvr_map_t;
static ERlvBehaviour getBehaviourFromString(const std::string& strBhvr, bool* pfStrict = NULL);
static bool getCommands(bhvr_map_t& cmdList, const std::string& strMatch);
static const std::string& getStringFromBehaviour(ERlvBehaviour eBhvr);
static bool hasStrictVariant(ERlvBehaviour eBhvr);
static void initLookupTable();
protected:
@@ -86,8 +88,7 @@ protected:
std::string m_strParam;
ERlvParamType m_eParamType;
typedef std::map<std::string, ERlvBehaviour> RlvBhvrTable;
static RlvBhvrTable m_BhvrMap;
static bhvr_map_t m_BhvrMap;
friend class RlvHandler;
};
@@ -317,7 +318,9 @@ protected:
public:
void addNotify(const LLUUID& idObj, S32 nChannel, const std::string& strFilter)
{
m_Notifications.insert(std::pair<LLUUID, notifyData>(idObj, notifyData(nChannel, strFilter)));
//m_Notifications.insert(std::pair<LLUUID, notifyData>(idObj, notifyData(nChannel, strFilter)));
// RLVa-HACK: see RlvBehaviourNotifyHandler::changed()
m_NotificationsDelayed.insert(std::pair<LLUUID, notifyData>(idObj, notifyData(nChannel, strFilter)));
}
void removeNotify(const LLUUID& idObj, S32 nChannel, const std::string& strFilter)
{
@@ -330,8 +333,6 @@ public:
break;
}
}
if (m_Notifications.empty())
delete this; // Delete ourself if we have nothing to do
}
void sendNotification(const std::string& strText, const std::string& strSuffix = LLStringUtil::null) const;
protected:
@@ -345,6 +346,7 @@ protected:
notifyData(S32 channel, const std::string& filter) : nChannel(channel), strFilter(filter) {}
};
std::multimap<LLUUID, notifyData> m_Notifications;
std::multimap<LLUUID, notifyData> m_NotificationsDelayed;
};
// ============================================================================

View File

@@ -372,7 +372,7 @@ void RlvRenameOnWearObserver::doneIdle()
}
const LLViewerJointAttachment* pAttachPt = NULL; S32 idxAttachPt = 0;
RLV_ASSERT(mComplete.size() > 0); // Catch instances where we forgot to call startFetch()
// RLV_ASSERT(mComplete.size() > 0); // Catch instances where we forgot to call startFetch()
for (uuid_vec_t::const_iterator itItem = mComplete.begin(); itItem != mComplete.end(); ++itItem)
{
const LLUUID& idAttachItem = *itItem;
@@ -389,7 +389,7 @@ void RlvRenameOnWearObserver::doneIdle()
if ( ((pAttachPt = pAvatar->getWornAttachmentPoint(idAttachItem)) == NULL) ||
((idxAttachPt = RlvAttachPtLookup::getAttachPointIndex(pAttachPt)) == 0) )
{
RLV_ASSERT(false);
// RLV_ASSERT(false);
continue;
}
@@ -636,7 +636,7 @@ bool RlvWearableItemCollector::onCollectFolder(const LLInventoryCategory* pFolde
return false;
bool fAttach = RlvForceWear::isWearAction(m_eWearAction);
bool fMatchAll = (!fLinkedFolder) && (m_eWearFlags | RlvForceWear::FLAG_MATCHALL);
bool fMatchAll = (!fLinkedFolder) && (m_eWearFlags & RlvForceWear::FLAG_MATCHALL);
if ( (!fLinkedFolder) && (RlvInventory::isFoldedFolder(pFolder, false)) ) // Check for folder that should get folded under its parent
{

View File

@@ -76,4 +76,4 @@ void change_category_parent(LLInventoryModel* model, LLViewerInventoryCategory*
// ============================================================================
#endif // RLV_VIEWER2_H
#endif // RLV_VIEWER2_H

View File

@@ -283,7 +283,7 @@ Save all changes to clothing/body parts?
name="GrantModifyRights"
type="alertmodal">
Granting modify rights to another resident allows them to change, delete or take ANY objects you may have in-world. Be VERY careful when handing out this permission.
Do you want to grant modify rights for [FIRST_NAME] [LAST_NAME]?
Do you want to grant modify rights for [NAME]?
<usetemplate
name="okcancelbuttons"
notext="No"
@@ -306,7 +306,7 @@ Do you want to grant modify rights for the selected Residents?
icon="alertmodal.tga"
name="RevokeModifyRights"
type="alertmodal">
Do you want to revoke modify rights for [FIRST_NAME] [LAST_NAME]?
Do you want to revoke modify rights for [NAME]?
<usetemplate
name="okcancelbuttons"
notext="No"
@@ -2153,7 +2153,7 @@ Would you be my friend?
icon="alertmodal.tga"
name="RemoveFromFriends"
type="alertmodal">
Do you want to remove [FIRST_NAME] [LAST_NAME] from your Friends List?
Do you want to remove [NAME] from your Friends List?
<usetemplate
name="okcancelbuttons"
notext="Cancel"