From 9302b9658ee8a2bc8547d5131faed42b6efa5575 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Thu, 19 Aug 2010 10:54:12 -0700 Subject: Applied RLVa-1.0.5e_fix.patch by Kitty Barnett to fix RLVa up to 1.0.5.e --- linden/indra/newview/CMakeLists.txt | 4 +- linden/indra/newview/llagent.cpp | 21 +-- linden/indra/newview/llappviewer.cpp | 6 + linden/indra/newview/llchatbar.cpp | 10 +- linden/indra/newview/llfirstuse.cpp | 41 ++++- linden/indra/newview/llfirstuse.h | 2 +- linden/indra/newview/llfloaterabout.cpp | 2 +- linden/indra/newview/llfloateravatarpicker.cpp | 24 +++ linden/indra/newview/llfloaterchat.cpp | 5 +- linden/indra/newview/llfloatermap.cpp | 22 ++- linden/indra/newview/llfloatermap.h | 4 +- linden/indra/newview/llfloaterobjectiminfo.cpp | 33 +++- linden/indra/newview/llhudeffectlookat.cpp | 3 + linden/indra/newview/llinventorybridge.cpp | 45 +++-- linden/indra/newview/llnetmap.cpp | 57 +++---- linden/indra/newview/llnotify.cpp | 2 +- linden/indra/newview/llpanelavatar.cpp | 2 +- linden/indra/newview/llpanelcontents.cpp | 18 ++ linden/indra/newview/llpanelgeneral.cpp | 1 + linden/indra/newview/llpanelinventory.cpp | 4 +- linden/indra/newview/llpanellogin.cpp | 10 +- linden/indra/newview/llpanelobject.cpp | 4 +- linden/indra/newview/llpanelpermissions.cpp | 13 +- linden/indra/newview/llselectmgr.cpp | 12 +- linden/indra/newview/llstartup.cpp | 11 +- linden/indra/newview/lltoolbar.cpp | 14 ++ linden/indra/newview/lltoolpie.cpp | 28 ++-- linden/indra/newview/lltoolplacer.cpp | 2 +- linden/indra/newview/llviewercontrol.cpp | 28 ++-- linden/indra/newview/llviewermenu.cpp | 42 ++--- linden/indra/newview/llviewermessage.cpp | 185 ++++++++++++++++++--- linden/indra/newview/llviewerobject.cpp | 2 +- linden/indra/newview/llviewertexteditor.cpp | 2 +- linden/indra/newview/llvoavatar.cpp | 41 +++-- linden/indra/newview/llworldmapview.cpp | 11 +- linden/indra/newview/panelradar.cpp | 11 +- linden/indra/newview/rlvdefines.h | 4 +- linden/indra/newview/rlvextensions.cpp | 2 +- linden/indra/newview/rlvhandler.cpp | 25 ++- linden/indra/newview/rlvhelper.cpp | 7 - .../skins/default/xui/en-us/notifications.xml | 48 ++++++ 41 files changed, 573 insertions(+), 235 deletions(-) diff --git a/linden/indra/newview/CMakeLists.txt b/linden/indra/newview/CMakeLists.txt index e0a35cb..a7b78f1 100644 --- a/linden/indra/newview/CMakeLists.txt +++ b/linden/indra/newview/CMakeLists.txt @@ -909,8 +909,6 @@ set(viewer_HEADER_FILES pipeline.h primbackup.h randgauss.h - VertexCache.h - VorbisFramework.h rlvdefines.h rlvevent.h rlvhandler.h @@ -918,6 +916,8 @@ set(viewer_HEADER_FILES rlvmultistringsearch.h rlvextensions.h rlvfloaterbehaviour.h + VertexCache.h + VorbisFramework.h viewertime.h viewerversion.h ) diff --git a/linden/indra/newview/llagent.cpp b/linden/indra/newview/llagent.cpp index ef05fae..38e1c0f 100644 --- a/linden/indra/newview/llagent.cpp +++ b/linden/indra/newview/llagent.cpp @@ -4307,16 +4307,14 @@ void LLAgent::changeCameraToCustomizeAvatar(BOOL avatar_animate, BOOL camera_ani return; } +// if(gSavedSettings.getBOOL("AppearanceAnimate")) // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) - if(gSavedSettings.getBOOL("AppearanceAnimate")) - if ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) && (mAvatarObject.notNull()) && (mAvatarObject->mIsSitting) ) - { - return; - } + if ( (gSavedSettings.getBOOL("AppearanceAnimate")) && + ((!gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || ((mAvatarObject.notNull()) && (!mAvatarObject->mIsSitting))) ) // [/RLVa:KB] - - if(gSavedSettings.getBOOL("AppearanceAnimate")) + { setControlFlags(AGENT_CONTROL_STAND_UP); // force stand up + } gViewerWindow->getWindow()->resetBusyCount(); if (gFaceEditToolset) @@ -6285,8 +6283,7 @@ void LLAgent::setTeleportState(ETeleportState state) // We're outa here. Save "back" slurl. mTeleportSourceSLURL = getSLURL(); } - -// [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-07 (RLVa-1.0.0d) | Added: RLVa-0.2.0b +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-07 (RLVa-1.0.0d) | Added: RLVa-0.2.0b if ( (rlv_handler_t::isEnabled()) && (TELEPORT_NONE == mTeleportState) ) { gRlvHandler.setCanCancelTp(true); @@ -7473,7 +7470,7 @@ void LLAgent::removeWearable( EWearableType type ) return; } -// [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-07 (RLVa-1.0.0d) +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-07 (RLVa-1.0.0d) if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.isRemovable(type)) ) { return; @@ -7616,9 +7613,9 @@ void LLAgent::setWearableOutfit( wearables_to_remove[WT_UNDERSHIRT] = (!gAgent.isTeen()) && remove && gRlvHandler.isRemovable(WT_UNDERSHIRT); wearables_to_remove[WT_UNDERPANTS] = (!gAgent.isTeen()) && remove && gRlvHandler.isRemovable(WT_UNDERPANTS); wearables_to_remove[WT_SKIRT] = remove && gRlvHandler.isRemovable(WT_SKIRT); + wearables_to_remove[WT_ALPHA] = remove && gRlvHandler.isRemovable(WT_ALPHA); + wearables_to_remove[WT_TATTOO] = remove && gRlvHandler.isRemovable(WT_TATTOO); // [/RLVa:KB] - wearables_to_remove[WT_ALPHA] = remove; - wearables_to_remove[WT_TATTOO] = remove; S32 count = wearables.count(); llassert( items.count() == count ); diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp index f1cd447..d757ba6 100644 --- a/linden/indra/newview/llappviewer.cpp +++ b/linden/indra/newview/llappviewer.cpp @@ -1826,6 +1826,12 @@ bool LLAppViewer::initConfiguration() LLFirstUse::addConfigVariable("FirstMedia"); LLFirstUse::addConfigVariable("FirstLoginScreen"); +// [RLVa:KB] - Checked: RLVa-1.0.3a (2009-09-10) | Added: RLVa-1.0.3a + //LLFirstUse::addConfigVariable(RLV_SETTING_FIRSTUSE_DETACH); + //LLFirstUse::addConfigVariable(RLV_SETTING_FIRSTUSE_ENABLEWEAR); + //LLFirstUse::addConfigVariable(RLV_SETTING_FIRSTUSE_FARTOUCH); +// [/RLVa:KB] + // - read command line settings. LLControlGroupCLP clp; std::string cmd_line_config = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, diff --git a/linden/indra/newview/llchatbar.cpp b/linden/indra/newview/llchatbar.cpp index 5a7586e..3c977dd 100644 --- a/linden/indra/newview/llchatbar.cpp +++ b/linden/indra/newview/llchatbar.cpp @@ -558,16 +558,16 @@ 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 -// [RLVa:KB] - Checked: 2009-07-07 (RLVa-1.0.0d) - if ( (length > 0) && (raw_text[0] != '/') && (!gRlvHandler.hasBehaviour(RLV_BHVR_REDIRCHAT)) ) -// [/RLVa:KB] + if( (length > 0) && (raw_text[0] != '/') ) // forward slash is used for escape (eg. emote) sequences { if (self->mChanCtrlEnabled && (S32)(self->mChannelControl->get()) != 0) { gAgent.stopTyping(); } - else +// else +// [RLVa:KB] - Checked: 2009-07-07 (RLVa-1.0.0d) + else if (!gRlvHandler.hasBehaviour(RLV_BHVR_REDIRCHAT)) +// [/RLVa:KB] { gAgent.startTyping(); } diff --git a/linden/indra/newview/llfirstuse.cpp b/linden/indra/newview/llfirstuse.cpp index c0f07e5..886bb94 100644 --- a/linden/indra/newview/llfirstuse.cpp +++ b/linden/indra/newview/llfirstuse.cpp @@ -49,10 +49,6 @@ #include "floatergriddefault.h" #include "hippoGridManager.h" -// [RLVa:KB] - Version: 1.22.11 -#include "llviewerwindow.h" -// [/RLVa:KB] - // static std::set LLFirstUse::sConfigVariables; @@ -310,6 +306,43 @@ void LLFirstUse::useMedia() } } +// [RLVa:KB] - Version: 1.23.4 | Checked: RLVa-1.0.3a (2009-09-10) | Added: RLVa-1.0.3a + +bool rlvHasVisibleFirstUseNotification() +{ + LLNotificationChannelPtr activeNotifications = LLNotifications::instance().getChannel("Notifications"); + for (LLNotificationChannel::Iterator itNotif = activeNotifications->begin(); itNotif != activeNotifications->end(); itNotif++) + if ((*itNotif)->getName().find(RLV_SETTING_FIRSTUSE_PREFIX) == 0) + return true; + return false; +} + +void LLFirstUse::showRlvFirstUseNotification(const std::string& strName) +{ + if ( (gSavedSettings.getWarning(strName)) && (!rlvHasVisibleFirstUseNotification()) ) + { + gSavedSettings.setWarning(strName, FALSE); + LLNotifications::instance().add(strName); + } +} + +void LLFirstUse::warnRlvGiveToRLV() +{ + if ( (gSavedSettings.getWarning(RLV_SETTING_FIRSTUSE_GIVETORLV)) && (RlvSettings::getForbidGiveToRLV()) ) + LLNotifications::instance().add(RLV_SETTING_FIRSTUSE_GIVETORLV, LLSD(), LLSD(), &LLFirstUse::onRlvGiveToRLVConfirmation); +} + +void LLFirstUse::onRlvGiveToRLVConfirmation(const LLSD& notification, const LLSD& response) +{ + gSavedSettings.setWarning(RLV_SETTING_FIRSTUSE_GIVETORLV, FALSE); + + S32 idxOption = LLNotification::getSelectedOption(notification, response); + if ( (0 == idxOption) || (1 == idxOption) ) + gSavedSettings.setBOOL(RLV_SETTING_FORBIDGIVETORLV, (idxOption == 1)); +} + +// [/RLVa:KB] + void LLFirstUse::callbackClientTags(const LLSD& notification, const LLSD& response) { gSavedSettings.setWarning("ClientTags", FALSE); diff --git a/linden/indra/newview/llfirstuse.h b/linden/indra/newview/llfirstuse.h index bd44ece..c77f0b2 100644 --- a/linden/indra/newview/llfirstuse.h +++ b/linden/indra/newview/llfirstuse.h @@ -129,7 +129,7 @@ public: static void warnRlvGiveToRLV(); protected: - static void onRlvGiveToRLVConfirmation(S32 idxOption, void* pUserParam); + static void onRlvGiveToRLVConfirmation(const LLSD& notification, const LLSD& response); // [/RLVa:KB] }; diff --git a/linden/indra/newview/llfloaterabout.cpp b/linden/indra/newview/llfloaterabout.cpp index 7e6c43f..1945df4 100644 --- a/linden/indra/newview/llfloaterabout.cpp +++ b/linden/indra/newview/llfloaterabout.cpp @@ -141,7 +141,7 @@ LLFloaterAbout::LLFloaterAbout() // Position LLViewerRegion* region = gAgent.getRegion(); -// [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-04 (RLVa-1.0.0a) +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-04 (RLVa-1.0.0a) if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) { support.append(rlv_handler_t::cstrHidden); diff --git a/linden/indra/newview/llfloateravatarpicker.cpp b/linden/indra/newview/llfloateravatarpicker.cpp index c5a6a37..4eca8af 100644 --- a/linden/indra/newview/llfloateravatarpicker.cpp +++ b/linden/indra/newview/llfloateravatarpicker.cpp @@ -351,6 +351,30 @@ void LLFloaterAvatarPicker::populateNearMe() void LLFloaterAvatarPicker::draw() { LLFloater::draw(); + +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RLVa-1.0.0e + // TODO-RLVa: this code needs revisiting + if (rlv_handler_t::isEnabled()) + { + LLPanel* pNearMePanel = getChild("NearMePanel"); + if ( (pNearMePanel) && (childGetVisibleTab("ResidentChooserTabs") == pNearMePanel) ) + { + if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) + { + if (mNearMeListComplete) + { + getChild("NearMe")->deleteAllItems(); + childSetEnabled("Select", false); + } + mNearMeListComplete = FALSE; + pNearMePanel->setCtrlsEnabled(FALSE); + return; + } + pNearMePanel->setCtrlsEnabled(TRUE); + } + } +// [/RLVa:KB] + if (!mNearMeListComplete && childGetVisibleTab("ResidentChooserTabs") == getChild("NearMePanel")) { populateNearMe(); diff --git a/linden/indra/newview/llfloaterchat.cpp b/linden/indra/newview/llfloaterchat.cpp index 7613e36..b14930b 100644 --- a/linden/indra/newview/llfloaterchat.cpp +++ b/linden/indra/newview/llfloaterchat.cpp @@ -208,10 +208,11 @@ void add_timestamped_line(LLViewerTextEditor* edit, LLChat chat, const LLColor4& // extract out the sender name and replace it with the hotlinked name. if (chat.mSourceType == CHAT_SOURCE_AGENT && chat.mFromID != LLUUID::null && +// chat.mFromID != gAgent.getID()) +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e) chat.mFromID != gAgent.getID() && -// [RLVa] - Version: 1.22.11 | Checked: 2009-07-08 (RLVa-1.0.0e) (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ) -// [/RLVa] +// [/RLVa:KB] { chat.mURL = llformat("secondlife:///app/agent/%s/about",chat.mFromID.asString().c_str()); } diff --git a/linden/indra/newview/llfloatermap.cpp b/linden/indra/newview/llfloatermap.cpp index bfbc8bb..b56fb5f 100644 --- a/linden/indra/newview/llfloatermap.cpp +++ b/linden/indra/newview/llfloatermap.cpp @@ -154,18 +154,6 @@ void LLFloaterMap::draw() } } -// [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-05 (RLVa-1.0.0c) -void LLFloaterMap::open() -{ - if (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWMINIMAP)) - { - LLFloater::open(); - LLFirstUse::useMiniMap(); - } -} -// [/RLVa:KB] - - PanelRadar* LLFloaterMap::getRadar() { return mPanelRadar; @@ -263,3 +251,13 @@ void LLFloaterMap::adjustLayout( bool expand ) toggle->setRect( temp_rect ); } } + +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-05 (RLVa-1.0.0c) +void LLFloaterMap::open() +{ + if (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWMINIMAP)) + { + LLFloater::open(); + } +} +// [/RLVa:KB] diff --git a/linden/indra/newview/llfloatermap.h b/linden/indra/newview/llfloatermap.h index 5b0497f..6f7281e 100644 --- a/linden/indra/newview/llfloatermap.h +++ b/linden/indra/newview/llfloatermap.h @@ -55,8 +55,8 @@ public: /*virtual*/ void onOpen(); /*virtual*/ void onClose(bool app_quitting); /*virtual*/ BOOL canClose(); -// [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-05 (RLVa-1.0.0c) - /*virtual*/ void open(); +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-05 (RLVa-1.0.0c) + /*virtual*/ void open(); // [/RLVa:KB] PanelRadar* getRadar(); diff --git a/linden/indra/newview/llfloaterobjectiminfo.cpp b/linden/indra/newview/llfloaterobjectiminfo.cpp index 7ef3af2..fa7964c 100644 --- a/linden/indra/newview/llfloaterobjectiminfo.cpp +++ b/linden/indra/newview/llfloaterobjectiminfo.cpp @@ -47,6 +47,10 @@ #include "llurldispatcher.h" #include "llviewercontrol.h" +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-04 (RLVa-1.0.0a) | Added: RLVa-0.2.0g +#include "rlvhandler.h" +// [/RLVa:KB] + //////////////////////////////////////////////////////////////////////////// // LLFloaterObjectIMInfo class LLFloaterObjectIMInfo : public LLFloater, public LLFloaterSingleton @@ -100,7 +104,10 @@ void LLFloaterObjectIMInfo::update(const LLUUID& object_id, const std::string& n { // When talking to an old region we won't have a slurl. // The object id isn't really the object id either but we don't use it so who cares. - bool have_slurl = !slurl.empty(); + //bool have_slurl = !slurl.empty(); +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-04 (RLVa-1.0.0a) | Added: RLVa-0.2.0g + bool have_slurl = (!slurl.empty()) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)); +// [/RLVa:KB] childSetVisible("Unknown_Slurl",!have_slurl); childSetVisible("Slurl",have_slurl); @@ -108,7 +115,10 @@ void LLFloaterObjectIMInfo::update(const LLUUID& object_id, const std::string& n childSetText("Slurl",slurl); childSetText("OwnerName",std::string("")); - bool my_object = (owner_id == gAgentID); +// bool my_object = (owner_id == gAgentID); +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RLVa-0.2.0g + bool my_object = (owner_id == gAgentID) || ((gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (gRlvHandler.isAgentNearby(owner_id))); +// [/RLVa:KB] childSetEnabled("Mute",!my_object); mObjectID = object_id; @@ -139,7 +149,10 @@ void LLFloaterObjectIMInfo::onClickOwner(void* data) { LLFloaterGroupInfo::showFromUUID(self->mOwnerID); } - else +// else +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RLVa-0.2.0g + else if ( (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) || (!gRlvHandler.isAgentNearby(self->mOwnerID)) ) +// [/RLVa:KB] { LLFloaterAvatarInfo::showFromObject(self->mOwnerID); } @@ -151,6 +164,13 @@ void LLFloaterObjectIMInfo::onClickMute(void* data) LLFloaterObjectIMInfo* self = (LLFloaterObjectIMInfo*)data; LLMute::EType mute_type = (self->mOwnerIsGroup) ? LLMute::GROUP : LLMute::AGENT; +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RLVa-0.2.0g + if ( (LLMute::GROUP != mute_type) && (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (gRlvHandler.isAgentNearby(self->mOwnerID)) ) + { + return; + } +// [/RLVa:KB] + LLMute mute(self->mOwnerID, self->mOwnerName, mute_type); LLMuteList::getInstance()->add(mute); LLFloaterMute::showInstance(); @@ -167,6 +187,13 @@ void LLFloaterObjectIMInfo::nameCallback(const LLUUID& id, const std::string& fi self->mOwnerName += " " + last; } +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RLVa-0.2.0g + if ( (!is_group) && (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (gRlvHandler.isAgentNearby(id)) ) + { + self->mOwnerName = gRlvHandler.getAnonym(self->mOwnerName); + } +// [/RLVa:KB] + self->childSetText("OwnerName",self->mOwnerName); } diff --git a/linden/indra/newview/llhudeffectlookat.cpp b/linden/indra/newview/llhudeffectlookat.cpp index a997910..561fce5 100644 --- a/linden/indra/newview/llhudeffectlookat.cpp +++ b/linden/indra/newview/llhudeffectlookat.cpp @@ -41,6 +41,7 @@ #include "llagent.h" #include "llvoavatar.h" #include "lldrawable.h" +#include "llviewercontrol.h" #include "llviewerobjectlist.h" #include "llviewerwindow.h" #include "llrendersphere.h" @@ -593,11 +594,13 @@ void LLHUDEffectLookAt::render() LLColor4 Color = LLColor4( (*mAttentions)[mTargetType].mColor, 1.0f ); std::string text = ((LLVOAvatar*)(LLViewerObject*)mSourceObject)->getFullname(); +// [RLVa:KB] - Imprudence-1.3.0 // Show anonyms in place of actual names when @shownames=n restricted if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) { text = gRlvHandler.getAnonym(text); } +// [/RLVa:KB] gViewerWindow->setupViewport(); hud_render_utf8text(text, render_pos, *fontp, LLFontGL::NORMAL, -0.5f * fontp->getWidthF32(text), 3.f, Color, FALSE ); diff --git a/linden/indra/newview/llinventorybridge.cpp b/linden/indra/newview/llinventorybridge.cpp index fe56ae0..41af123 100644 --- a/linden/indra/newview/llinventorybridge.cpp +++ b/linden/indra/newview/llinventorybridge.cpp @@ -3463,10 +3463,32 @@ void rez_attachment(LLViewerInventoryItem* item, LLViewerJointAttachment* attach if (attachment && attachment->getObject()) { +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a + if ( (rlv_handler_t::isEnabled()) && // Can't replace an existing object if it's undetachable + (gRlvHandler.isLockedAttachment(attach_pt, RLV_LOCK_ANY)) ) // or if we're not allowed to attach to that attach point + { + return; + } +// [/RLVa:KB] LLNotifications::instance().add("ReplaceAttachment", LLSD(), payload, confirm_replace_attachment_rez); } else { +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-10-10 (RLVa-1.0.5) | Modified: RLVa-1.0.5 + if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedAttachment(RLV_LOCK_ANY)) ) + { + if (0 == attach_pt) // Can't wear on the default attachment point + { + if (!RlvSettings::getEnableWear()) // (unless "Enable Wear" is enabled) + return; + gRlvHandler.onWearAttachment(item->getUUID()); + } + else if (gRlvHandler.isLockedAttachment(attach_pt, RLV_LOCK_ADD)) // and we can never wear on a non-attachable attach point + { + return; + } + } +// [/RLVa:KB] LLNotifications::instance().forceResponse(LLNotification::Params("ReplaceAttachment").payload(payload), 0/*YES*/); } } @@ -3553,7 +3575,7 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags) items.push_back(std::string("RestoreToWorld Separator")); items.push_back(std::string("Restore to Last Position")); -// [RLVa:KB] - Version: 1.22.11 | Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a if ( (rlv_handler_t::isEnabled()) && (!RlvSettings::getEnableWear()) && (gRlvHandler.hasLockedAttachment(RLV_LOCK_ANY)) ) { LLViewerJointAttachment* pAttachPt = gRlvHandler.getAttachPoint(item, true); // The item's name should specify @@ -4113,7 +4135,7 @@ void wear_inventory_category_on_avatar_step2( BOOL proceed, void* userdata ) is_gesture); S32 gest_count = gest_item_array.count(); -// [RLVa:KB] - Version: 1.22.11 | Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedAttachment(RLV_LOCK_ANY)) ) { // Filter anything that we shouldn't be attaching @@ -4395,10 +4417,11 @@ void wear_attachments_on_avatar(const LLInventoryModel::item_array_t& items, BOO msg->addU8Fast(_PREHASH_TotalObjects, count ); // msg->addBOOLFast(_PREHASH_FirstDetachAll, remove ); // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Added: RLVa-1.0.5a - // This really should just *always* be FALSE since TRUE can result in loss of the current asset state - msg->addBOOLFast(_PREHASH_FirstDetachAll, remove && (!gRlvHandler.hasLockedAttachment(RLV_LOCK_ANY)) ); + // This really should just *always* be FALSE since TRUE can result in loss of the current asset state + msg->addBOOLFast(_PREHASH_FirstDetachAll, + (remove) && (!gRlvHandler.hasLockedAttachment(RLV_LOCK_ANY)) ); // [/RLVa:KB] - } + } LLInventoryItem* item = items.get(i); msg->nextBlockFast(_PREHASH_ObjectData ); @@ -4406,10 +4429,10 @@ void wear_attachments_on_avatar(const LLInventoryModel::item_array_t& items, BOO msg->addUUIDFast(_PREHASH_OwnerID, item->getPermissions().getOwner()); // msg->addU8Fast(_PREHASH_AttachmentPt, 0 ); // Wear at the previous or default attachment point // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Added: RLVa-1.0.5a - msg->addU8Fast(_PREHASH_AttachmentPt, - ( (!rlv_handler_t::isEnabled()) || (RlvSettings::getEnableWear()) || (!gRlvHandler.hasLockedAttachment(RLV_LOCK_ANY)) ) - ? 0 - : gRlvHandler.getAttachPointIndex(gRlvHandler.getAttachPoint(item, true))); + msg->addU8Fast(_PREHASH_AttachmentPt, + ( (!rlv_handler_t::isEnabled()) || (RlvSettings::getEnableWear()) || (!gRlvHandler.hasLockedAttachment(RLV_LOCK_ANY)) ) + ? 0 + : gRlvHandler.getAttachPointIndex(gRlvHandler.getAttachPoint(item, true))); // [/RLVa:KB] pack_permissions_slam(msg, item->getFlags(), item->getPermissions()); msg->addStringFast(_PREHASH_Name, item->getName()); @@ -4930,11 +4953,11 @@ void LLWearableBridge::onRemoveFromAvatarArrived(LLWearable* wearable, { EWearableType type = wearable->getType(); - //if( !(type==WT_SHAPE || type==WT_SKIN || type==WT_HAIR ) ) //&& - //!((!gAgent.isTeen()) && ( type==WT_UNDERPANTS || type==WT_UNDERSHIRT )) ) +// if( !(type==WT_SHAPE || type==WT_SKIN || type==WT_HAIR ) ) //&& // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RLVa-0.2.2a | SL big fix if( !(type==WT_SHAPE || type==WT_SKIN || type==WT_HAIR || type==WT_EYES) ) // [/RLVa:KB] + //!((!gAgent.isTeen()) && ( type==WT_UNDERPANTS || type==WT_UNDERSHIRT )) ) { gAgent.removeWearable( type ); } diff --git a/linden/indra/newview/llnetmap.cpp b/linden/indra/newview/llnetmap.cpp index 2b9810d..ec04337 100644 --- a/linden/indra/newview/llnetmap.cpp +++ b/linden/indra/newview/llnetmap.cpp @@ -370,7 +370,14 @@ void LLNetMap::draw() else { // Show them muted even if they're friends - if (LLMuteList::getInstance()->isMuted(avatar_ids[i])) +// [RLVa:KB] - Version: 1.23.4 | Alternate: Imprudence-1.3 | Checked: 2009-07-08 (RLVa-1.0.0e) | Modified: RLVa-0.2.0b + if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) + { + glyph_color = avatar_color; + } + else if (LLMuteList::getInstance()->isMuted(avatar_ids[i])) +// [/RLVa:KB] +// if (LLMuteList::getInstance()->isMuted(avatar_ids[i])) { glyph_color = muted_color; } @@ -388,15 +395,6 @@ void LLNetMap::draw() } } -// [RLVa:KB] - Alternate: Imprudence-1.2.0 - if ( gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) ) - { - // User is not allowed to see who it is, or even if it's a friend, - // due to RLV settings. - glyph_color = avatar_color; - } -// [/RLVa:KB] - LLWorldMapView::drawAvatar( pos_map.mV[VX], pos_map.mV[VY], glyph_color, @@ -624,26 +622,17 @@ BOOL LLNetMap::handleToolTip( S32 x, S32 y, std::string& msg, LLRect* sticky_rec std::string fullname; if(mClosestAgentToCursor.notNull() && gCacheName->getFullName(mClosestAgentToCursor, fullname)) { -// [RLVa:KB] - Alternate: Imprudence-1.2.0 - // User is not allowed to see who it is, due to RLV settings. +// msg.append(fullname); +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e) | Modified: RLVa-0.2.0b msg.append( (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ? fullname : gRlvHandler.getAnonym(fullname) ); +// [/RLVa:KB] msg.append("\n"); - // [/RLVa:KB] } -// [RLVa:KB] - Alternate: Imprudence-1.2.0 - if ( gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC) ) - { - // User is not allowed to see where they are, due to RLV settings. - msg.append( rlv_handler_t::cstrHidden ); - } - else - { - msg.append( region->getName() ); - } +// msg.append( region->getName() ); +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-04 (RLVa-1.0.0a) | Modified: RLVa-0.2.0b + msg.append( (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ? region->getName() : rlv_handler_t::cstrHidden ); // [/RLVa:KB] - - msg.append("\n"); gSavedSettings.getBOOL( "MiniMapTeleport" ) ? msg.append(getString("tooltip_tp")) : msg.append(getString("tooltip_map")); @@ -1043,24 +1032,24 @@ bool LLNetMap::LLEnableTracking::handleEvent(LLPointer event, const LLS bool LLNetMap::LLShowAgentProfile::handleEvent(LLPointer event, const LLSD& userdata) { -// [RLVa:KB] - Alternate: Imprudence-1.2.0 - if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) + LLNetMap *self = mPtr; +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e) | Modified: RLVa-0.2.0b + if (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) { - return true; + LLFloaterAvatarInfo::show(self->mClosestAgentAtLastRightClick); } // [/RLVa:KB] - - LLNetMap *self = mPtr; - LLFloaterAvatarInfo::show(self->mClosestAgentAtLastRightClick); + //LLFloaterAvatarInfo::show(self->mClosestAgentAtLastRightClick); return true; } bool LLNetMap::LLEnableProfile::handleEvent(LLPointer event, const LLSD& userdata) { LLNetMap *self = mPtr; - //self->findControl(userdata["control"].asString())->setValue(self->isAgentUnderCursor()); -// [RLVa:KB] - Alternate: Imprudence-1.2.0 - self->findControl(userdata["control"].asString())->setValue(self->isAgentUnderCursor() && !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)); +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e) | Modified: RLVa-0.2.0b + self->findControl(userdata["control"].asString())->setValue( + (self->isAgentUnderCursor()) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ); // [/RLVa:KB] + //self->findControl(userdata["control"].asString())->setValue(self->isAgentUnderCursor()); return true; } diff --git a/linden/indra/newview/llnotify.cpp b/linden/indra/newview/llnotify.cpp index 2afd185..ef57aaf 100644 --- a/linden/indra/newview/llnotify.cpp +++ b/linden/indra/newview/llnotify.cpp @@ -57,7 +57,7 @@ #include "hippoGridManager.h" -// [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-10 (RLVa-1.0.0e) | Added: RLVa-0.2.0b +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-10 (RLVa-1.0.0e) | Added: RLVa-0.2.0b #include "rlvhandler.h" // [/RLVa:KB] diff --git a/linden/indra/newview/llpanelavatar.cpp b/linden/indra/newview/llpanelavatar.cpp index 1701f69..ad0f47f 100644 --- a/linden/indra/newview/llpanelavatar.cpp +++ b/linden/indra/newview/llpanelavatar.cpp @@ -869,7 +869,7 @@ void LLPanelAvatarClassified::processAvatarClassifiedReply(LLMessageSystem* msg, // static void LLPanelAvatarClassified::onClickNew(void* data) { -// [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-04 (RLVa-1.0.0a) +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-04 (RLVa-1.0.0a) if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) { return; diff --git a/linden/indra/newview/llpanelcontents.cpp b/linden/indra/newview/llpanelcontents.cpp index 33cebec..e5c4f79 100644 --- a/linden/indra/newview/llpanelcontents.cpp +++ b/linden/indra/newview/llpanelcontents.cpp @@ -123,6 +123,24 @@ void LLPanelContents::getState(LLViewerObject *objectp ) && ( objectp->permYouOwner() || ( !group_id.isNull() && gAgent.isInGroup(group_id) ))); // solves SL-23488 BOOL all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ); +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a + if ( (rlv_handler_t::isEnabled()) && (editable) ) + { + // Don't allow creation of new scripts if it's undetachable + editable = !gRlvHandler.isLockedAttachment(objectp, RLV_LOCK_REMOVE); + + // Don't allow creation of new scripts if we're @unsit=n or @sittp=n restricted and we're sitting on the selection + if ( (editable) && ((gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SITTP))) ) + { + LLVOAvatar* pAvatar = gAgent.getAvatarObject(); + // Only check the first (non-)root object because nothing else would result in enabling the button (see below) + LLViewerObject* pObj = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject(TRUE); + + editable = (pObj) && (pAvatar) && ((!pAvatar->mIsSitting) || (pAvatar->getRoot() != pObj->getRootEdit())); + } + } +// [/RLVa:KB] + // Edit script button - ok if object is editable and there's an unambiguous destination for the object. childSetEnabled("button new script", editable && diff --git a/linden/indra/newview/llpanelgeneral.cpp b/linden/indra/newview/llpanelgeneral.cpp index 538eb22..287ee41 100644 --- a/linden/indra/newview/llpanelgeneral.cpp +++ b/linden/indra/newview/llpanelgeneral.cpp @@ -44,6 +44,7 @@ #include "floatergridmanager.h" #include "llagent.h" +#include "llappviewer.h" #include "llpanellogin.h" #include "llviewerregion.h" #include "viewertime.h" diff --git a/linden/indra/newview/llpanelinventory.cpp b/linden/indra/newview/llpanelinventory.cpp index f882362..85f6ea2 100644 --- a/linden/indra/newview/llpanelinventory.cpp +++ b/linden/indra/newview/llpanelinventory.cpp @@ -82,12 +82,12 @@ #include "llviewerwindow.h" #include "llwearable.h" +#include "hippoGridManager.h" + // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) #include "llvoavatar.h" // [/RLVa:KB] -#include "hippoGridManager.h" - ///---------------------------------------------------------------------------- /// Local function declarations, constants, enums, and typedefs ///---------------------------------------------------------------------------- diff --git a/linden/indra/newview/llpanellogin.cpp b/linden/indra/newview/llpanellogin.cpp index 460c67f..23b7785 100644 --- a/linden/indra/newview/llpanellogin.cpp +++ b/linden/indra/newview/llpanellogin.cpp @@ -83,7 +83,7 @@ #include "llglheaders.h" -// [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-08 (RLVa-1.0.0e) +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e) #include "rlvhandler.h" // [/RLVa:KB] @@ -737,18 +737,16 @@ void LLPanelLogin::refreshLocation( bool force_visible ) if ( ! force_visible ) show_start = gSavedSettings.getBOOL("ShowStartLocation"); - // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) -// TODO-RLVa: figure out some way to make this work with RLV_EXTENSION_STARTLOCATION -#ifndef RLV_EXTENSION_STARTLOCATION + // TODO-RLVa: figure out some way to make this work with RLV_EXTENSION_STARTLOCATION + #ifndef RLV_EXTENSION_STARTLOCATION if (rlv_handler_t::isEnabled()) { show_start = FALSE; } -#endif // RLV_EXTENSION_STARTLOCATION + #endif // RLV_EXTENSION_STARTLOCATION // [/RLVa:KB] - sInstance->childSetVisible("start_location_combo", show_start); sInstance->childSetVisible("start_location_text", show_start); diff --git a/linden/indra/newview/llpanelobject.cpp b/linden/indra/newview/llpanelobject.cpp index a0736f1..9ef7f91 100644 --- a/linden/indra/newview/llpanelobject.cpp +++ b/linden/indra/newview/llpanelobject.cpp @@ -76,10 +76,12 @@ #include "lldrawpool.h" +#include "hippoLimits.h" + // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) #include "llvoavatar.h" // [/RLVa:KB] -#include "hippoLimits.h" + // // Constants // diff --git a/linden/indra/newview/llpanelpermissions.cpp b/linden/indra/newview/llpanelpermissions.cpp index cd1aee7..a97d177 100644 --- a/linden/indra/newview/llpanelpermissions.cpp +++ b/linden/indra/newview/llpanelpermissions.cpp @@ -354,10 +354,7 @@ void LLPanelPermissions::refresh() fRlvEnableOwner && owners_identical && (mOwnerID.notNull() || LLSelectMgr::getInstance()->selectIsGroupOwned())); // [/RLVa:KB] - //if (owner_name != last_owner_name) -// [RLVa:KB] - if ( (owner_name != last_owner_name) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ) -// [/RLVa:KB] + if (owner_name != last_owner_name) { childSetEnabled("Last Owner:", TRUE); childSetText("Last Owner Name", last_owner_name); @@ -903,7 +900,13 @@ void LLPanelPermissions::onClickLastOwner(void *data) if ( self->mLastOwnerID.notNull() ) { - LLFloaterAvatarInfo::showFromObject(self->mLastOwnerID); +// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) + if (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) + { + LLFloaterAvatarInfo::showFromObject(self->mLastOwnerID); + } +// [/RLVa:KB] +// LLFloaterAvatarInfo::showFromObject(self->mLastOwnerID); } } diff --git a/linden/indra/newview/llselectmgr.cpp b/linden/indra/newview/llselectmgr.cpp index 8064245..83abcf4 100644 --- a/linden/indra/newview/llselectmgr.cpp +++ b/linden/indra/newview/llselectmgr.cpp @@ -3439,12 +3439,20 @@ void LLSelectMgr::deselectAllIfTooFar() } LLVector3d selectionCenter = getSelectionCenterGlobal(); - if (gSavedSettings.getBOOL("LimitSelectDistance") + +// if (gSavedSettings.getBOOL("LimitSelectDistance") +// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.0f + BOOL fRlvFartouch = gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH) && gFloaterTools->getVisible(); + if ( (gSavedSettings.getBOOL("LimitSelectDistance") || (fRlvFartouch) ) +// [/RLVa:KB] && (!mSelectedObjects->getPrimaryObject() || !mSelectedObjects->getPrimaryObject()->isAvatar()) && !mSelectedObjects->isAttachment() && !selectionCenter.isExactlyZero()) { - F32 deselect_dist = gSavedSettings.getF32("MaxSelectDistance"); +// F32 deselect_dist = gSavedSettings.getF32("MaxSelectDistance"); +// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.0f + F32 deselect_dist = (!fRlvFartouch) ? gSavedSettings.getF32("MaxSelectDistance") : 1.5f; +// [/RLVa:KB] F32 deselect_dist_sq = deselect_dist * deselect_dist; LLVector3d select_delta = gAgent.getPositionGlobal() - selectionCenter; diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index cec2c4b..b12c253 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp @@ -399,7 +399,7 @@ bool idle_startup() // Initialize stuff that doesn't need data from simulators // -// [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.1d +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.1d if ( (gSavedSettings.controlExists(RLV_SETTING_MAIN)) && (gSavedSettings.getBOOL(RLV_SETTING_MAIN)) ) rlv_handler_t::setEnabled(TRUE); // [/RLVa:KB] @@ -2757,11 +2757,6 @@ bool idle_startup() // reset keyboard focus to sane state of pointing at world gFocusMgr.setKeyboardFocus(NULL); -#if 0 // sjb: enable for auto-enabling timer display - gDebugView->mFastTimerView->setVisible(TRUE); -#endif - - // [RLVa:KB] - Alternate: Snowglobe-1.0 | Checked: 2009-08-05 (RLVa-1.0.1e) | Modified: RLVa-1.0.1e // RELEASE-RLVa: this should go in LLAppViewer::handleLoginComplete() but Imprudence doesn't call that function gRlvHandler.initLookupTables(); @@ -2779,6 +2774,10 @@ bool idle_startup() } // [/RLVa:KB] +#if 0 // sjb: enable for auto-enabling timer display + gDebugView->mFastTimerView->setVisible(TRUE); +#endif + return TRUE; } diff --git a/linden/indra/newview/lltoolbar.cpp b/linden/indra/newview/lltoolbar.cpp index cc6d4b8..645d29a 100644 --- a/linden/indra/newview/lltoolbar.cpp +++ b/linden/indra/newview/lltoolbar.cpp @@ -303,6 +303,20 @@ void LLToolBar::refresh() } gSavedSettings.setBOOL("BuildBtnState", build_mode); +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-10 (RLVa-1.0.0g) + // Called per-frame so this really can't be slow + if (rlv_handler_t::isEnabled()) + { + // If we're rez-restricted, we can still edit => allow build floater + // If we're edit-restricted, we can still rez => allow build floater + childSetEnabled("build_btn", !(gRlvHandler.hasBehaviour(RLV_BHVR_REZ) && gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) ); + + childSetEnabled("map_btn", !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWWORLDMAP) ); + childSetEnabled("radar_btn", !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWMINIMAP) ); + childSetEnabled("inventory_btn", !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWINV) ); + } +// [/RLVa:KB] + if (isInVisibleChain()) { updateCommunicateList(); diff --git a/linden/indra/newview/lltoolpie.cpp b/linden/indra/newview/lltoolpie.cpp index c2be831..262c349 100644 --- a/linden/indra/newview/lltoolpie.cpp +++ b/linden/indra/newview/lltoolpie.cpp @@ -373,22 +373,22 @@ BOOL LLToolPie::pickAndShowMenu(BOOL always_show) //gMutePieMenu->setLabel("Mute"); } +// gPieAvatar->show(x, y, mPieMouseButtonDown); // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Added: RLVa-0.2.0f -#ifdef RLV_EXPERIMENTAL_FARTOUCH_FEEDBACK - // If we have an empty selection under @fartouch=n don't show the pie menu but play the "operation block" sound - if ( (!gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) || (!LLSelectMgr::getInstance()->getSelection()->isEmpty()) ) - { -#endif // RLV_EXPERIMENTAL_FARTOUCH_FEEDBACK - gPieAvatar->show(x, y, mPieMouseButtonDown); -#ifdef RLV_EXPERIMENTAL_FARTOUCH_FEEDBACK - } - else - { - make_ui_sound("UISndInvalidOp"); - } -#endif // RLV_EXPERIMENTAL_FARTOUCH_FEEDBACK + #ifdef RLV_EXPERIMENTAL_FARTOUCH_FEEDBACK + // If we have an empty selection under @fartouch=n don't show the pie menu but play the "operation block" sound + if ( (!gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) || (!LLSelectMgr::getInstance()->getSelection()->isEmpty()) ) + { + #endif // RLV_EXPERIMENTAL_FARTOUCH_FEEDBACK + gPieAvatar->show(x, y, mPieMouseButtonDown); + #ifdef RLV_EXPERIMENTAL_FARTOUCH_FEEDBACK + } + else + { + make_ui_sound("UISndInvalidOp"); + } + #endif // RLV_EXPERIMENTAL_FARTOUCH_FEEDBACK // [/RLVa:KB] - } else if (object->isAttachment() && !object->isHUDAttachment()) { diff --git a/linden/indra/newview/lltoolplacer.cpp b/linden/indra/newview/lltoolplacer.cpp index ba065b1..d5c4de1 100644 --- a/linden/indra/newview/lltoolplacer.cpp +++ b/linden/indra/newview/lltoolplacer.cpp @@ -288,7 +288,7 @@ BOOL LLToolPlacer::addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics ) gMessageSystem->addU8Fast(_PREHASH_Material, material); U32 flags = 0; // not selected - //if (create_selected) +// if (create_selected) // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0b) | Added: RLVa-1.0.0b if ( (create_selected) && (!gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) ) // [/RLVa:KB] diff --git a/linden/indra/newview/llviewercontrol.cpp b/linden/indra/newview/llviewercontrol.cpp index 0edb2c4..e1507d4 100644 --- a/linden/indra/newview/llviewercontrol.cpp +++ b/linden/indra/newview/llviewercontrol.cpp @@ -485,20 +485,6 @@ bool handleVoiceClientPrefsChanged(const LLSD& newvalue) return true; } -// [RLVa:KB] - Checked: 2009-08-11 (RLVa-1.0.1h) | Added: RLVa-1.0.1h -bool rlvHandleEnableLegacyNamingChanged(const LLSD& newvalue) -{ - rlv_handler_t::fLegacyNaming = newvalue.asBoolean(); - return true; -} - -bool rlvHandleShowNameTagsChanged(const LLSD& newvalue) -{ - RlvSettings::fShowNameTags = newvalue.asBoolean(); - return true; -} -// [/RLVa:KB] - bool handleMediaDebugLevelChanged(const LLSD& newvalue) { LLMediaManager *mgr = LLMediaManager::getInstance(); @@ -521,6 +507,20 @@ bool handleSliderScrollWheelMultiplierChanged(const LLSD& newvalue) return true; } +// [RLVa:KB] - Checked: 2009-08-11 (RLVa-1.0.1h) | Added: RLVa-1.0.1h +bool rlvHandleEnableLegacyNamingChanged(const LLSD& newvalue) +{ + rlv_handler_t::fLegacyNaming = newvalue.asBoolean(); + return true; +} + +bool rlvHandleShowNameTagsChanged(const LLSD& newvalue) +{ + RlvSettings::fShowNameTags = newvalue.asBoolean(); + return true; +} +// [/RLVa:KB] + //////////////////////////////////////////////////////////////////////////// void settings_setup_listeners() diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index 594694d..c5ce236 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp @@ -1424,7 +1424,7 @@ void init_debug_baked_texture_menu(LLMenuGL* menu) menu->createJumpKeys(); } -// [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-1.0.0g +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-1.0.0g void init_debug_rlva_menu(LLMenuGL* menu) { // Debug options @@ -1710,7 +1710,7 @@ class LLObjectEnableTouch : public view_listener_t { LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); bool new_value = obj && obj->flagHandleTouch(); -// [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-10 (RLVa-1.0.0g) | Added: RLVa-0.2.0f +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-10 (RLVa-1.0.0g) | Added: RLVa-0.2.0f // TODO-RLVa: this code is rather redundant since we'll never get an active selection to show a pie menu for if ( (new_value) && (gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) && ((!obj->isAttachment()) || (!obj->permYouOwner())) && (dist_vec_squared(gAgent.getPositionAgent(), LLToolPie::getInstance()->getPick().mIntersection) > 1.5f * 1.5f) ) @@ -2525,13 +2525,6 @@ class LLObjectImportUpload : public view_listener_t bool handle_go_to_confirm() { -// [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) - if ( (rlv_handler_t::isEnabled()) && (gAgent.forwardGrabbed()) && (gRlvHandler.hasLockedAttachment(RLV_LOCK_REMOVE)) ) - { - return true; - } -// [/RLVa:KB] - std::string action = gSavedSettings.getString("GoAction"); LLStringUtil::toLower(action); @@ -2554,7 +2547,7 @@ bool handle_go_to() { return true; } - // [/RLVa:KB] +// [/RLVa:KB] handle_go_to_callback( LLSD(), LLSD(0) ); @@ -2672,17 +2665,14 @@ class LLAvatarFreeze : public view_listener_t std::string fullname = avatar->getFullname(); LLSD payload; payload["avatar_id"] = avatar->getID(); -// [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-08 (RLVa-1.0.0e) - if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (!fullname.empty()) ) - { - fullname = gRlvHandler.getAnonym(fullname); - } -// [/RLVa:KB] if (!fullname.empty()) { LLSD args; - args["AVATAR_NAME"] = fullname; +// args["AVATAR_NAME"] = fullname; +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e) + args["AVATAR_NAME"] = (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ? fullname : gRlvHandler.getAnonym(fullname); +// [/RLVa:KB] LLNotifications::instance().add("FreezeAvatarFullname", args, payload, @@ -2807,7 +2797,7 @@ class LLAvatarEject : public view_listener_t LLSD payload; payload["avatar_id"] = avatar->getID(); std::string fullname = avatar->getFullname(); -// [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-08 (RLVa-1.0.0e) +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e) if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (!fullname.empty()) ) { fullname = gRlvHandler.getAnonym(fullname); @@ -4153,10 +4143,10 @@ class LLObjectReturn : public view_listener_t bool handleEvent(LLPointer event, const LLSD& userdata) { if (LLSelectMgr::getInstance()->getSelection()->isEmpty()) return true; -// [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-05 (RLVa-1.0.0b) +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-05 (RLVa-1.0.0b) if ( (rlv_handler_t::isEnabled()) && (!rlvCanDeleteOrReturn()) ) return true; // [/RLVa:KB] - + mObjectSelection = LLSelectMgr::getInstance()->getEditSelection(); LLNotifications::instance().add("ReturnToOwner", LLSD(), LLSD(), boost::bind(&LLObjectReturn::onReturnToOwner, this, _1, _2)); @@ -4873,8 +4863,6 @@ class LLToolsEnableUnlink : public view_listener_t } // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.0g - // The user might not be allowed to unlink this object due to RLV settings, - // because it would unsit them if they are sitting on the object. if ( (new_value) && (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) && (gAgent.getAvatarObject()) && (gAgent.getAvatarObject()->mIsSitting) ) { @@ -4896,8 +4884,6 @@ class LLToolsUnlink : public view_listener_t bool handleEvent(LLPointer event, const LLSD& userdata) { // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.0g - // The user might not be allowed to unlink this object due to RLV settings, - // because it would unsit them if they are sitting on the object. if ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) && (gAgent.getAvatarObject()) && (gAgent.getAvatarObject()->mIsSitting) ) { // Allow if the avie isn't sitting on any of the selected objects @@ -10916,6 +10902,7 @@ class LLAdvancedCheckMaxBuildConstraints : public view_listener_t /////////////// +// [RLVa:KB] - Alternate: Imprudence-1.2.0 class RLVaMainToggle : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) @@ -10935,7 +10922,7 @@ class RLVaMainCheck : public view_listener_t return true; } }; - +// [/RLVa:KB] //////////////////// @@ -10943,6 +10930,7 @@ class RLVaMainCheck : public view_listener_t //////////////////// +// [RLVa:KB] - Alternate: Imprudence-1.2.0 class RLVaBehaviorsShow : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) @@ -10951,7 +10939,7 @@ class RLVaBehaviorsShow : public view_listener_t return true; } }; - +// [/RLVa:KB] static void addMenu(view_listener_t *menu, const char *name) @@ -11369,8 +11357,10 @@ void initialize_menus() addMenu(new LLAdvancedCheckMaxBuildConstraints(), "Advanced.CheckMaxBuildConstraints"); // RLVa +// [RLVa:KB] - Alternate: Imprudence-1.2.0 addMenu(new RLVaMainToggle(), "RLVa.Main.Toggle"); addMenu(new RLVaMainCheck(), "RLVa.Main.Enabled"); addMenu(new RLVaBehaviorsShow(), "RLVa.Behaviors.Show"); +// [/RLVa:KB] } diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp index 7f2504c..af4b8d8 100644 --- a/linden/indra/newview/llviewermessage.cpp +++ b/linden/indra/newview/llviewermessage.cpp @@ -151,17 +151,17 @@ #include "llwindebug.h" // For the invalid message handler #endif -// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) -#include "llfloateravatarinfo.h" -extern LLMap< const LLUUID, LLFloaterAvatarInfo* > gAvatarInfoInstances; // Only defined in llfloateravatarinfo.cpp -// [/RLVa:KB] - //silly spam define D: bool dialogSpamOn; static LLFrameTimer d_spam; std::map< std::string , S32 > lastd_names; LLDynamicArray< std::string > blacklisted_names; +// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) +#include "llfloateravatarinfo.h" +extern LLMap< const LLUUID, LLFloaterAvatarInfo* > gAvatarInfoInstances; // Only defined in llfloateravatarinfo.cpp +// [/RLVa:KB] + // // Constants // @@ -1116,8 +1116,17 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& std::string first_name, last_name; if (gCacheName->getName(mFromID, first_name, last_name)) { - from_string = std::string("An object named '") + mFromName + "' owned by " + first_name + " " + last_name; - chatHistory_string = mFromName + " owned by " + first_name + " " + last_name; +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e) + std::string full_name = first_name + " " + last_name; + if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (gRlvHandler.isAgentNearby(mFromID)) ) + { + full_name = gRlvHandler.getAnonym(full_name); + } + from_string = std::string("An object named '") + mFromName + "' owned by " + full_name; + chatHistory_string = mFromName + " owned by " + full_name; +// [/RLVa:KB] + //from_string = std::string("An object named '") + mFromName + "' owned by " + first_name + " " + last_name; + //chatHistory_string = mFromName + " owned by " + first_name + " " + last_name; } else { @@ -1136,6 +1145,21 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& switch(button) { case IOR_ACCEPT: +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-10 (RLVa-1.0.0g) | Added: RLVa-0.2.2a + // Only change the inventory offer's destination folder to the shared root if: + // - the user has enabled the feature + // - the inventory offer came from a script (and specifies a folder) + // - the name starts with the prefix [mDesc format (quotes are part of the string): "[OBJECTNAME] ( http://slurl.com/... )"] + if ( (rlv_handler_t::isEnabled()) && (!RlvSettings::getForbidGiveToRLV()) && + (IM_TASK_INVENTORY_OFFERED == mIM) && (LLAssetType::AT_CATEGORY == mType) && (mDesc.find(RLV_PUTINV_PREFIX) == 1) ) + { + LLViewerInventoryCategory* pRlvRoot = gRlvHandler.getSharedRoot(); + if (pRlvRoot) + { + mFolderID = pRlvRoot->getUUID(); + } + } +// [/RLVa:KB] // ACCEPT. The math for the dialog works, because the accept // for inventory_offered, task_inventory_offer or // group_notice_inventory is 1 greater than the offer integer value. @@ -1303,7 +1327,7 @@ void inventory_offer_handler(LLOfferInfo* info, BOOL from_task) if(indx >= 0) { LLStringUtil::truncate(msg, indx); -// [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-04 (RLVa-1.0.0a) | Added: RLVa-1.0.0a +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-04 (RLVa-1.0.0a) | Added: RLVa-1.0.0a // TODO-RLVa: needs revisiting when LL saves open notifications to disk to accept them on the next relog if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) { @@ -1352,6 +1376,13 @@ void inventory_offer_handler(LLOfferInfo* info, BOOL from_task) std::string first_name, last_name; if (gCacheName->getName(info->mFromID, first_name, last_name)) { +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e) + if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (gRlvHandler.isAgentNearby(info->mFromID)) ) + { + first_name = gRlvHandler.getAnonym(first_name.append(" ").append(last_name)); + last_name.clear(); + } +// [/RLVa:KB] args["FIRST"] = first_name; args["LAST"] = last_name; name_found = TRUE; @@ -1371,6 +1402,12 @@ void inventory_offer_handler(LLOfferInfo* info, BOOL from_task) } else { +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e) + if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (gRlvHandler.isAgentNearby(info->mFromID)) ) + { + args["NAME"] = gRlvHandler.getAnonym(info->mFromName); + } +// [/RLVa:KB] p.name = "UserGiveItem"; } @@ -1628,11 +1665,11 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) to_id.isNull() ) do_auto_response = false; - // if( do_auto_response ) - // [RLVa:KB] - Alternate: Emerald-370 +// if( do_auto_response ) +// [RLVa:KB] - Alternate: Emerald-370 // Emerald 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] +// [/RLVa:KB] { if((dialog == IM_NOTHING_SPECIAL && !is_auto_response) || (dialog == IM_TYPING_START && gSavedPerAccountSettings.getBOOL("InstantMessageShowOnTyping")) @@ -1860,7 +1897,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) } else if (to_id.isNull()) { -// [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-08 (RLVa-1.0.0e) +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e) // Filter region messages that weren't sent by a Linden if ( (rlv_handler_t::isEnabled()) && (LLMuteList::getInstance()) && (!LLMuteList::getInstance()->isLinden(name)) && (from_id != gAgent.getID()) ) @@ -2160,6 +2197,14 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) } else { +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-09-10 (RLVa-1.0.3a) + if ( (rlv_handler_t::isEnabled()) && (dialog == IM_TASK_INVENTORY_OFFERED) && + (info->mDesc.find(RLV_PUTINV_PREFIX) == 1) && (gRlvHandler.getSharedRoot()) ) + { + LLFirstUse::warnRlvGiveToRLV(); + } +// [/RLVa:KB] + inventory_offer_handler(info, dialog == IM_TASK_INVENTORY_OFFERED); } } @@ -2167,13 +2212,23 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) case IM_INVENTORY_ACCEPTED: { - args["NAME"] = name; +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e) | Modified: RLVa-0.2.0b + bool fRlvObfuscate = (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && + (gRlvHandler.isAgentNearby(from_id)) && (!gAvatarInfoInstances.checkData(from_id)); + args["NAME"] = (!fRlvObfuscate) ? name : gRlvHandler.getAnonym(name); +// [/RLVa:KB] + //args["NAME"] = name; LLNotifications::instance().add("InventoryAccepted", args); break; } case IM_INVENTORY_DECLINED: { - args["NAME"] = name; +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e) | Modified: RLVa-0.2.0b + bool fRlvObfuscate = (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && + (gRlvHandler.isAgentNearby(from_id)) && (!gAvatarInfoInstances.checkData(from_id)); + args["NAME"] = (!fRlvObfuscate) ? name : gRlvHandler.getAnonym(name); +// [/RLVa:KB] + //args["NAME"] = name; LLNotifications::instance().add("InventoryDeclined", args); break; } @@ -2324,7 +2379,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) return; } { -// [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-08 (RLVa-1.0.0e) +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e) // TODO-RLVa: what actually generates this? if (rlv_handler_t::isEnabled()) { @@ -2367,6 +2422,27 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) } else { +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-07 (RLVa-1.0.0d) + if (rlv_handler_t::isEnabled()) + { + // Disallow if: 1) @tplure=n restricted (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) ) ) + { + rlvSendBusyMessage(from_id, rlv_handler_t::cstrMsgTpLure); + return; + } + + // Censor teleport message if: 1) @revcim=n restricted (sender isn't an exception), or 2) @showloc=n restricted + if ( ( (gRlvHandler.hasBehaviour(RLV_BHVR_RECVIM)) && (!gRlvHandler.isException(RLV_BHVR_RECVIM, from_id)) ) || + (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ) + { + message = rlv_handler_t::cstrHidden; + } + } +// [/RLVa:KB] + LLSD args; // *TODO:translate -> [FIRST] [LAST] (maybe) args["NAME"] = name; @@ -2375,7 +2451,21 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) payload["from_id"] = from_id; payload["lure_id"] = session_id; payload["godlike"] = FALSE; - LLNotifications::instance().add("TeleportOffered", args, payload); + //LLNotifications::instance().add("TeleportOffered", args, payload); + +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-07 (RLVa-1.0.0d) | Modified: RLVa-0.2.0b + if ( (rlv_handler_t::isEnabled()) && + ((gRlvHandler.hasBehaviour(RLV_BHVR_ACCEPTTP)) || (gRlvHandler.isException(RLV_BHVR_ACCEPTTP, from_id))) ) + { + gRlvHandler.setCanCancelTp(false); + LLNotifications::instance().forceResponse(LLNotification::Params("TeleportOffered").payload(payload), 0); + } + else + { + LLNotifications::instance().add("TeleportOffered", args, payload); + } +// [/RLVa:KB] + //LLNotifications::instance().add("TeleportOffered", args, payload); } } break; @@ -2657,8 +2747,9 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) // Make swirly things only for talking objects. (not script debug messages, though) // if (chat.mSourceType == CHAT_SOURCE_OBJECT // && chat.mChatType != CHAT_TYPE_DEBUG_MSG) -// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) +// [RLVa:KB] - Alternate: Snowglobe-1.2.4 | Checked: 2009-07-10 (RLVa-1.0.0g) // Don't show swirly things for llOwnerSay() chat here because we handle those further down + // RELEASE-RLVa: if this code changes, remember to change the code down below as well if ( (chat.mSourceType == CHAT_SOURCE_OBJECT && chat.mChatType != CHAT_TYPE_DEBUG_MSG) && ((!rlv_handler_t::isEnabled()) || (CHAT_TYPE_OWNER != chat.mChatType)) ) // [/RLVa:KB] @@ -2985,7 +3076,7 @@ void process_teleport_start(LLMessageSystem *msg, void**) U32 teleport_flags = 0x0; msg->getU32("Info", "TeleportFlags", teleport_flags); - //if (teleport_flags & TELEPORT_FLAGS_DISABLE_CANCEL) +// if (teleport_flags & TELEPORT_FLAGS_DISABLE_CANCEL) // [RLVa:KB] - Checked: 2009-07-07 (RLVa-1.0.0d) | Added: RLVa-0.2.0b if ( (teleport_flags & TELEPORT_FLAGS_DISABLE_CANCEL) || (!gRlvHandler.getCanCancelTp()) ) // [/RLVa:KB] @@ -5365,8 +5456,32 @@ void process_script_question(LLMessageSystem *msg, void **user_data) payload["object_name"] = object_name; payload["owner_name"] = owner_name; +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.0e + S32 rlvQuestionsOther = questions; + + if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasBehaviour(RLV_BHVR_ACCEPTPERMISSION)) ) + { + LLViewerObject* pObj = gObjectList.findObject(taskid); + if (pObj) + { + if (pObj->permYouOwner()) + { + // PERMISSION_TAKE_CONTROLS and PERMISSION_ATTACH are only auto-granted to objects this avie owns + rlvQuestionsOther &= ~(LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_TAKE_CONTROLS] | + LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_ATTACH]); + } + } + } + + if ( (!caution) && (!rlvQuestionsOther) ) + { + LLNotifications::instance().forceResponse( + LLNotification::Params("ScriptQuestion").substitutions(args).payload(payload), 0/*YES*/); + } + else if (gSavedSettings.getBOOL("PermissionsCautionEnabled")) +// [/RLVa:KB] // check whether cautions are even enabled or not - if (gSavedSettings.getBOOL("PermissionsCautionEnabled")) + //if (gSavedSettings.getBOOL("PermissionsCautionEnabled")) { // display the caution permissions prompt LLNotifications::instance().add(caution ? "ScriptQuestionCaution" : "ScriptQuestion", args, payload); @@ -5697,6 +5812,21 @@ bool handle_lure_callback(const LLSD& notification, const LLSD& response) if(0 == option) { +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.0b + if (gRlvHandler.hasBehaviour(RLV_BHVR_SENDIM)) + { + for (LLSD::array_const_iterator it = notification["payload"]["ids"].beginArray(); + it != notification["payload"]["ids"].endArray(); ++it) + { + if (!gRlvHandler.isException(RLV_BHVR_SENDIM, it->asUUID())) + { + text = rlv_handler_t::cstrHidden; + break; + } + } + } +// [/RLVa:KB] + LLMessageSystem* msg = gMessageSystem; msg->newMessageFast(_PREHASH_StartLure); msg->nextBlockFast(_PREHASH_AgentData); @@ -5729,13 +5859,28 @@ void handle_lure(const LLUUID& invitee) void handle_lure(LLDynamicArray& ids) { LLSD edit_args; - edit_args["REGION"] = gAgent.getRegion()->getName(); +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-04 (RLVa-1.0.0a) + edit_args["REGION"] = (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ? gAgent.getRegion()->getName() : rlv_handler_t::cstrHidden; +// [/RLVa:KB] + //edit_args["REGION"] = gAgent.getRegion()->getName(); LLSD payload; for (LLDynamicArray::iterator it = ids.begin(); it != ids.end(); ++it) { +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-07 (RLVa-1.0.0d) | Modified: RLVa-1.0.0a + // Only allow offering teleports if everyone is a @tplure exception or able to map this avie under @showloc=n + if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) + { + const LLRelationship* pBuddyInfo = LLAvatarTracker::instance().getBuddyInfo(*it); + if ( (!gRlvHandler.isException(RLV_BHVR_TPLURE, *it, RLV_CHECK_PERMISSIVE)) && + ((!pBuddyInfo) || (!pBuddyInfo->isOnline()) || (!pBuddyInfo->isRightGrantedTo(LLRelationship::GRANT_MAP_LOCATION))) ) + { + return; + } + } +// [/RLVa:KB] payload["ids"].append(*it); } if (gAgent.isGodlike()) diff --git a/linden/indra/newview/llviewerobject.cpp b/linden/indra/newview/llviewerobject.cpp index 6e74caf..a854583 100644 --- a/linden/indra/newview/llviewerobject.cpp +++ b/linden/indra/newview/llviewerobject.cpp @@ -1419,7 +1419,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, coloru.mV[3] = 255 - coloru.mV[3]; mText->setColor(LLColor4(coloru)); mText->setStringUTF8(temp_string); -// [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-09 (RLVa-1.0.0f) | Added: RLVa-1.0.0f +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-09 (RLVa-1.0.0f) | Added: RLVa-1.0.0f if (rlv_handler_t::isEnabled()) { mText->setObjectText(temp_string); diff --git a/linden/indra/newview/llviewertexteditor.cpp b/linden/indra/newview/llviewertexteditor.cpp index cee346e..0e16282 100644 --- a/linden/indra/newview/llviewertexteditor.cpp +++ b/linden/indra/newview/llviewertexteditor.cpp @@ -1387,7 +1387,7 @@ BOOL LLViewerTextEditor::openEmbeddedItem(LLInventoryItem* item, llwchar wc) void LLViewerTextEditor::openEmbeddedTexture( LLInventoryItem* item, llwchar wc ) { -// [RLVa:KB] - Version: 1.22.11 | Checked: 2009-10-13 (RLVa-1.0.5c) | Added: RLVa-1.0.5c +// [RLVa:KB] - Checked: 2009-10-13 (RLVa-1.0.5c) | Added: RLVa-1.0.5c if (gRlvHandler.hasBehaviour(RLV_BHVR_VIEWTEXTURE)) { return; diff --git a/linden/indra/newview/llvoavatar.cpp b/linden/indra/newview/llvoavatar.cpp index f3eec54..513d43c 100644 --- a/linden/indra/newview/llvoavatar.cpp +++ b/linden/indra/newview/llvoavatar.cpp @@ -93,10 +93,12 @@ #else #include "boost/lexical_cast.hpp" #endif +#include "hippoLimits.h"// getMaxPrimScale + // [RLVa:KB] #include "llstartup.h" // [/RLVa:KB] -#include "hippoLimits.h"// getMaxPrimScale + using namespace LLVOAvatarDefines; //----------------------------------------------------------------------------- @@ -3626,30 +3628,33 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) || is_appearance != mNameAppearance || client.length() != 0) { std::string line; - - if (mRenderGroupTitles && title && title->getString() && title->getString()[0] != '\0') +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RLVa-0.2.0b + if (!fRlvShowNames) { - line += title->getString(); - //LLStringFn::replace_ascii_controlchars(line,LL_UNKNOWN_CHAR); IMP-136 -- McCabe - line += "\n"; - line += firstname->getString(); +// [/RLVa:KB] + if (mRenderGroupTitles && title && title->getString() && title->getString()[0] != '\0') + { + line += title->getString(); + //LLStringFn::replace_ascii_controlchars(line,LL_UNKNOWN_CHAR); IMP-136 -- McCabe + line += "\n"; + line += firstname->getString(); + } + else + { + line += firstname->getString(); + } + + line += " "; + line += lastname->getString(); +// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RLVa-0.2.0b } else { - line += firstname->getString(); - } - - line += " "; - line += lastname->getString(); - -// [RLVa:KB] - if (fRlvShowNames) - { - // User is not allowed to see who it is, due to RLV settings. - line = gRlvHandler.getAnonym(line); + line = gRlvHandler.getAnonym(line.assign(firstname->getString()).append(" ").append(lastname->getString())); } // [/RLVa:KB] + BOOL need_comma = FALSE; bool show_client = client.length() != 0 && gSavedSettings.getBOOL("ShowClientNameTag"); diff --git a/linden/indra/newview/llworldmapview.cpp b/linden/indra/newview/llworldmapview.cpp index c10faa5..2e28d18 100644 --- a/linden/indra/newview/llworldmapview.cpp +++ b/linden/indra/newview/llworldmapview.cpp @@ -1246,13 +1246,16 @@ BOOL LLWorldMapView::handleToolTip( S32 x, S32 y, std::string& msg, LLRect* stic { LLViewerRegion *region = gAgent.getRegion(); +// std::string message = +// llformat("%s (%s)", +// info->mName.c_str(), +// LLViewerRegion::accessToString(info->mAccess).c_str()); +// [RLVa:KB] - Alternate: Snowglobe-1.0 | Checked: 2009-07-04 (RLVa-1.0.0a) std::string message = llformat("%s (%s)", - //info->mName.c_str(), -// [RLVa:KB] - Alternate: Snowglobe-1.0 | Checked: 2009-07-04 (RLVa-1.0.0a) - (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ? info->mName.c_str() : rlv_handler_t::cstrHidden.c_str(), -// [/RLVa:KB] + (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ? info->mName.c_str() : rlv_handler_t::cstrHidden.c_str(), LLViewerRegion::accessToString(info->mAccess).c_str()); +// [/RLVa:KB] if (info->mAccess != SIM_ACCESS_DOWN) { diff --git a/linden/indra/newview/panelradar.cpp b/linden/indra/newview/panelradar.cpp index c5fc3db..b323a77 100644 --- a/linden/indra/newview/panelradar.cpp +++ b/linden/indra/newview/panelradar.cpp @@ -47,6 +47,7 @@ #include "llscrolllistctrl.h" #include "lltracker.h" #include "lluictrlfactory.h" +#include "llviewercontrol.h" #include "llviewerobjectlist.h" #include "llviewermenu.h" #include "llviewermessage.h" @@ -291,12 +292,12 @@ void PanelRadar::updateRadarDisplay() element["id"] = entry->getID(); element["columns"][0]["column"] = "avatar_name"; element["columns"][0]["type"] = "text"; +// element["columns"][0]["value"] = typing + entry->getName() + " " + mute_text; // [RLVa:KB] - Alternate: Imprudence-1.2.0 - //element["columns"][0]["value"] = typing + entry->getName() + " " + mute_text; - std::string fullname = (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ? - gRlvHandler.getAnonym(fullname) : - typing + entry->getName() + " " + mute_text; - element["columns"][0]["value"] = fullname; + element["columns"][0]["value"] = + (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) + ? gRlvHandler.getAnonym(entry->getName()) + : typing + entry->getName() + " " + mute_text; // [/RLVa:KB] element["columns"][1]["column"] = "avatar_distance"; element["columns"][1]["type"] = "text"; diff --git a/linden/indra/newview/rlvdefines.h b/linden/indra/newview/rlvdefines.h index 3785b0a..21d7105 100644 --- a/linden/indra/newview/rlvdefines.h +++ b/linden/indra/newview/rlvdefines.h @@ -71,7 +71,7 @@ const S32 RLVa_VERSION_BUILD = 4; // Uncomment to enable the Advanced / RLVa / Unit Tests menu (non-public) //#define RLV_DEBUG_TESTS #else - // Uncomment if you want extended debugging information on release builds + // Uncomment if you want extended debugging information in release builds //#define RLV_DEBUG // Don't halt execution on errors in release #define RLV_ERRS LL_WARNS("RLV") @@ -82,7 +82,7 @@ const S32 RLVa_VERSION_BUILD = 4; #define RLV_ROOT_FOLDER "#RLV" #define RLV_CMD_PREFIX '@' #define RLV_PUTINV_PREFIX "#RLV/~" -#define RLV_SETROT_OFFSET F_PI_BY_TWO // @setrot is off by 90° with the rest of SL +#define RLV_SETROT_OFFSET F_PI_BY_TWO // @setrot is off by 90° with the rest of SL #define RLV_FOLDER_FLAG_NOSTRIP "nostrip" #define RLV_FOLDER_PREFIX_HIDDEN '.' diff --git a/linden/indra/newview/rlvextensions.cpp b/linden/indra/newview/rlvextensions.cpp index 769d3cc..f31c62e 100644 --- a/linden/indra/newview/rlvextensions.cpp +++ b/linden/indra/newview/rlvextensions.cpp @@ -97,7 +97,7 @@ BOOL RlvExtGetSet::processCommand(const LLUUID& idObj, const RlvCommand& rlvCmd) F32 nAngle = 0.0f; if (LLStringUtil::convertToF32(rlvCmd.getOption(), nAngle)) { - nAngle = RLV_SETROT_OFFSET - nAngle; + nAngle += RLV_SETROT_OFFSET; gAgent.startCameraAnimation(); diff --git a/linden/indra/newview/rlvhandler.cpp b/linden/indra/newview/rlvhandler.cpp index 68453af..904ed37 100644 --- a/linden/indra/newview/rlvhandler.cpp +++ b/linden/indra/newview/rlvhandler.cpp @@ -31,6 +31,10 @@ #include "rlvextensions.h" #include "rlvhandler.h" +// Only defined in llinventorybridge.cpp +#if RLV_TARGET < RLV_MAKE_TARGET(1, 23, 0) // Version: 1.22.11 + void confirm_replace_attachment_rez(S32 option, void* user_data); +#endif // Only defined in llinventorymodel.cpp extern const char* NEW_CATEGORY_NAME; @@ -112,7 +116,7 @@ static bool rlvParseNotifyOption(const std::string& strOption, S32& nChannel, st // Checked: 2009-08-04 (RLVa-1.0.1d) | Modified: RLVa-1.0.1d RlvHandler::RlvHandler() - : m_fCanCancelTp(true), m_idCurObject(LLUUID::null), m_pCurCommand(NULL), m_pGCTimer(NULL), m_pWLSnapshot(NULL), m_pBhvrNotify(NULL) + : m_fCanCancelTp(false), m_idCurObject(LLUUID::null), m_pCurCommand(NULL), m_pGCTimer(NULL), m_pWLSnapshot(NULL), m_pBhvrNotify(NULL) { // Array auto-initialization to 0 is non-standard? (Compiler warning in VC-8.0) memset(m_LayersAdd, 0, sizeof(S16) * WT_COUNT); @@ -596,8 +600,13 @@ BOOL RlvHandler::processAddCommand(const LLUUID& uuid, const RlvCommand& rlvCmd) case RLV_BHVR_SHOWMINIMAP: // @showminimap=n - Checked: 2009-07-05 (RLVa-1.0.0c) { // Simulate clicking the Minimap button [see LLToolBar::onClickRadar()] - if (LLFloaterMap::instanceVisible()) + #if RLV_TARGET < RLV_MAKE_TARGET(1, 23, 0) // Version: 1.22.11 + if (gFloaterMap->getVisible()) + LLFloaterMap::toggle(NULL); + #else // Version: 1.23.4 + if (LLFloaterMap::instanceVisible()) LLFloaterMap::hideInstance(); + #endif } break; #ifdef RLV_EXTENSION_STARTLOCATION @@ -1097,8 +1106,8 @@ BOOL RlvHandler::processReplyCommand(const LLUUID& uuid, const RlvCommand& rlvCm const EWearableType layerTypes[] = { - WT_GLOVES, WT_JACKET, WT_PANTS, WT_SHIRT, WT_SHOES, WT_SKIRT, WT_ALPHA, WT_TATTOO, WT_SOCKS, - WT_UNDERPANTS, WT_UNDERSHIRT, WT_SKIN, WT_EYES, WT_HAIR, WT_SHAPE + 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_ALPHA, WT_TATTOO }; #ifdef RLV_EXPERIMENTAL_COMPOSITE_FOLDING @@ -1601,8 +1610,8 @@ void RlvHandler::filterNames(std::string& strUTF8Text) const // -> the cost of multi string matching them all at once seems to be about the same as calling rlvStringReplace // twice so that would be a tremendous gain (and we'd get first name and word matching for free) #if RLV_TARGET < RLV_MAKE_TARGET(1, 23, 0) // Version: 1.22.11 - for (LLWorld::region_list_t::const_iterator itRegion = LLWorld::getInstance()->getRegionList().begin(); - itRegion != LLWorld::getInstance()->getRegionList().end(); ++itRegion) + for (LLWorld::region_list_t::const_iterator itRegion = LLWorld::getInstance()->mActiveRegionList.begin(); + itRegion != LLWorld::getInstance()->mActiveRegionList.end(); ++itRegion) { LLViewerRegion* pRegion = *itRegion; @@ -1688,8 +1697,8 @@ bool RlvHandler::redirectChatOrEmote(const std::string& strUTF8Text) const BOOL RlvHandler::isAgentNearby(const LLUUID& uuid) const { #if RLV_TARGET < RLV_MAKE_TARGET(1, 23, 0) // Version: 1.22.11 - for (LLWorld::region_list_t::const_iterator itRegion = LLWorld::getInstance()->getRegionList().begin(); - itRegion != LLWorld::getInstance()->getRegionList().end(); ++itRegion) + for (LLWorld::region_list_t::const_iterator itRegion = LLWorld::getInstance()->mActiveRegionList.begin(); + itRegion != LLWorld::getInstance()->mActiveRegionList.end(); ++itRegion) { LLViewerRegion* pRegion = *itRegion; diff --git a/linden/indra/newview/rlvhelper.cpp b/linden/indra/newview/rlvhelper.cpp index 67ffbe2..f509a43 100644 --- a/linden/indra/newview/rlvhelper.cpp +++ b/linden/indra/newview/rlvhelper.cpp @@ -1,7 +1,6 @@ #include "llviewerprecompiledheaders.h" #include "llagent.h" #include "llfloaterwindlight.h" -#include "llinventoryview.h" #include "llviewerobject.h" #include "llviewerstats.h" #include "llviewerwindow.h" @@ -12,12 +11,6 @@ #include "rlvevent.h" #include "rlvhandler.h" -// Only defined in llinventorybridge.cpp -#if RLV_TARGET < RLV_MAKE_TARGET(1, 23, 0) // Version: 1.22.11 - #include "llinventorybridge.h" - void confirm_replace_attachment_rez(S32 option, void* user_data); -#endif - // ============================================================================ // Static variable initialization // diff --git a/linden/indra/newview/skins/default/xui/en-us/notifications.xml b/linden/indra/newview/skins/default/xui/en-us/notifications.xml index 8eb2233..108728d 100644 --- a/linden/indra/newview/skins/default/xui/en-us/notifications.xml +++ b/linden/indra/newview/skins/default/xui/en-us/notifications.xml @@ -56,6 +56,20 @@ Always choose this option + +