diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 6d47774eeb4dc4cf03d7b45828f3eb18e571f825..5d64d81e2eb512ef88b38987c3a9527607e91346 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -95,6 +95,7 @@ #include "stringize.h" #include "boost/foreach.hpp" // [RLVa:KB] - Checked: 2011-11-04 (RLVa-1.4.4a) +#include "rlvactions.h" #include "rlvhandler.h" #include "rlvhelper.h" #include "rlvui.h" @@ -829,7 +830,7 @@ void LLAgent::standUp() // setControlFlags(AGENT_CONTROL_STAND_UP); // [RLVa:KB] - Checked: 2010-03-07 (RLVa-1.2.0c) | Added: RLVa-1.2.0a // RELEASE-RLVa: [SL-2.0.0] Check this function's callers since usually they require explicit blocking - if ( (!rlv_handler_t::isEnabled()) || (gRlvHandler.canStand()) ) + if ( (!rlv_handler_t::isEnabled()) || (RlvActions::canStand()) ) { setControlFlags(AGENT_CONTROL_STAND_UP); } @@ -1171,7 +1172,7 @@ void LLAgent::sitDown() // setControlFlags(AGENT_CONTROL_SIT_ON_GROUND); // [RLVa:KB] - Checked: 2010-08-28 (RLVa-1.2.1a) | Added: RLVa-1.2.1a // RELEASE-RLVa: [SL-2.0.0] Check this function's callers since usually they require explicit blocking - if ( (!rlv_handler_t::isEnabled()) || ((gRlvHandler.canStand()) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SIT))) ) + if ( (!rlv_handler_t::isEnabled()) || ((RlvActions::canStand()) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SIT))) ) { setControlFlags(AGENT_CONTROL_SIT_ON_GROUND); } @@ -4245,7 +4246,7 @@ void LLAgent::teleportViaLocationLookAt(const LLVector3d& pos_global) // [RLVa:KB] - Checked: 2010-10-07 (RLVa-1.2.1f) | Added: RLVa-1.2.1f // RELEASE-RLVa: [SL-2.2.0] Make sure this isn't used for anything except double-click teleporting if ( (rlv_handler_t::isEnabled()) && (!RlvUtil::isForceTp()) && - ((gRlvHandler.hasBehaviour(RLV_BHVR_SITTP)) || (!gRlvHandler.canStand())) ) + ((gRlvHandler.hasBehaviour(RLV_BHVR_SITTP)) || (!RlvActions::canStand())) ) { RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_TELEPORT); return; diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index 571a70585e0b2fd83b26cfce2228251f5c950ed3..c4359d205fc9606ef565b998dbfc49bcfe6b5bb7 100755 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -50,6 +50,7 @@ #include "llwindow.h" #include "llworld.h" // [RLVa:KB] - Checked: 2010-05-10 (RLVa-1.2.0g) +#include "rlvactions.h" #include "rlvhandler.h" // [/RLVa:KB] @@ -2252,7 +2253,7 @@ void LLAgentCamera::changeCameraToCustomizeAvatar() } // [RLVa:KB] - Checked: 2010-03-07 (RLVa-1.2.0c) | Modified: RLVa-1.0.0g - if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.canStand()) ) + if ( (rlv_handler_t::isEnabled()) && (!RlvActions::canStand()) ) { return; } diff --git a/indra/newview/llagentlistener.cpp b/indra/newview/llagentlistener.cpp index e49b9cc20ef232f2672ed3087ec8bdfda9ce058f..fd4d4c1735d1b5ce91fab058eab2825d3d96ebc7 100755 --- a/indra/newview/llagentlistener.cpp +++ b/indra/newview/llagentlistener.cpp @@ -44,6 +44,7 @@ #include "llhudeffectlookat.h" #include "llagentcamera.h" // [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1a) +#include "rlvactions.h" #include "rlvhandler.h" #include "llvoavatarself.h" // [/RLVa:KB] @@ -226,7 +227,7 @@ void LLAgentListener::requestStand(LLSD const & event_data) const { // [RLVa:KB] - Checked: 2010-03-07 (RLVa-1.2.0c) | Added: RLVa-1.2.0a // TODO-RLVa: [RLVa-1.2.1] Figure out how to call this? - if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.canStand()) ) + if ( (rlv_handler_t::isEnabled()) && (!RlvActions::canStand()) ) { return; } diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index 38b00059f5db88c3f813009b426e6c212a4172f7..e6be3c7cc8a29fb2addf86fb28f8cd2e619d76ef 100755 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -51,7 +51,7 @@ #include "llviewerregion.h" #include "lltooltip.h" // [RLVa:KB] - Checked: 2010-03-07 (RLVa-1.2.0c) -#include "rlvhandler.h" +#include "rlvactions.h" // [/RLVa:KB] // @@ -463,7 +463,7 @@ void LLFloaterMove::sUpdateMovementStatus() LLFloaterMove* pFloater = LLFloaterReg::findTypedInstance<LLFloaterMove>("moveview"); if (pFloater) { - pFloater->mModeControlButtonMap[MM_RUN]->setEnabled(!gRlvHandler.hasBehaviour(RLV_BHVR_ALWAYSRUN)); + pFloater->mModeControlButtonMap[MM_RUN]->setEnabled(!RlvActions::hasBehaviour(RLV_BHVR_ALWAYSRUN)); pFloater->mModeControlButtonMap[MM_FLY]->setEnabled(gAgent.canFly()); } } @@ -702,7 +702,7 @@ LLPanelStandStopFlying* LLPanelStandStopFlying::getStandStopFlyingPanel() void LLPanelStandStopFlying::onStandButtonClick() { // [RLVa:KB] - Checked: 2010-03-07 (RLVa-1.2.0c) | Added: RLVa-1.2.0a - if ( (!rlv_handler_t::isEnabled()) || (gRlvHandler.canStand()) ) + if ( (!RlvActions::isRlvEnabled()) || (RlvActions::canStand()) ) { LLFirstUse::sit(false); diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index a98c3fe9d66c126391297773a5506fa6618807fe..ec933fcbd1dc240d0184c413b92349aa71761b27 100755 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -93,6 +93,7 @@ #include "llviewershadermgr.h" #include "llpanelface.h" // [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1a) +#include "rlvactions.h" #include "rlvhandler.h" // [/RLVa:KB] #include "llglheaders.h" @@ -659,7 +660,7 @@ bool LLSelectMgr::enableLinkObjects() } } // [RLVa:KB] - Checked: 2011-03-19 (RLVa-1.3.0f) | Modified: RLVa-0.2.0g - if ( (new_value) && ((rlv_handler_t::isEnabled()) && (!gRlvHandler.canStand())) ) + if ( (new_value) && ((rlv_handler_t::isEnabled()) && (!RlvActions::canStand())) ) { // Allow only if the avie isn't sitting on any of the selected objects LLObjectSelectionHandle hSel = LLSelectMgr::getInstance()->getSelection(); @@ -681,7 +682,7 @@ bool LLSelectMgr::enableUnlinkObjects() !first_editable_object->isAttachment() && !first_editable_object->isPermanentEnforced() && ((root_object == NULL) || !root_object->isPermanentEnforced()); // [RLVa:KB] - Checked: 2011-03-19 (RLVa-1.3.0f) | Modified: RLVa-0.2.0g - if ( (new_value) && ((rlv_handler_t::isEnabled()) && (!gRlvHandler.canStand())) ) + if ( (new_value) && ((rlv_handler_t::isEnabled()) && (!RlvActions::canStand())) ) { // Allow only if the avie isn't sitting on any of the selected objects LLObjectSelectionHandle hSel = LLSelectMgr::getInstance()->getSelection(); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 17ddfeb890237c8f45f7e8749bd8c47c9f030895..1da50644db83a0715b2b664da9b230691202bdb5 100755 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -128,6 +128,7 @@ #include "llpathfindingmanager.h" #include "boost/unordered_map.hpp" // [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1a) +#include "rlvactions.h" #include "rlvhandler.h" #include "rlvlocks.h" // [/RLVa:KB] @@ -3939,7 +3940,7 @@ class LLEditEnableCustomizeAvatar : public view_listener_t { // bool new_value = gAgentWearables.areWearablesLoaded(); // [RLVa:KB] - Checked: 2010-04-01 (RLVa-1.2.0c) | Modified: RLVa-1.0.0g - bool new_value = gAgentWearables.areWearablesLoaded() && ((!rlv_handler_t::isEnabled()) || (gRlvHandler.canStand())); + bool new_value = gAgentWearables.areWearablesLoaded() && ((!rlv_handler_t::isEnabled()) || (RlvActions::canStand())); // [/RLVa:KB] return new_value; } @@ -4052,7 +4053,7 @@ class LLLandSit : public view_listener_t bool handleEvent(const LLSD& userdata) { // [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.2.1f - if ( (rlv_handler_t::isEnabled()) && ((!gRlvHandler.canStand()) || (gRlvHandler.hasBehaviour(RLV_BHVR_SIT))) ) + if ( (rlv_handler_t::isEnabled()) && ((!RlvActions::canStand()) || (gRlvHandler.hasBehaviour(RLV_BHVR_SIT))) ) return true; // [/RLVa:KB] @@ -4595,7 +4596,7 @@ void handle_take_copy() if (LLSelectMgr::getInstance()->getSelection()->isEmpty()) return; // [RLVa:KB] - Checked: 2010-03-07 (RLVa-1.2.0c) | Modified: RLVa-1.2.0a - if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.canStand()) ) + if ( (rlv_handler_t::isEnabled()) && (!RlvActions::canStand()) ) { // Allow only if the avie isn't sitting on any of the selected objects LLObjectSelectionHandle hSel = LLSelectMgr::getInstance()->getSelection(); @@ -6156,7 +6157,7 @@ bool enable_object_stand_up() // 'Object Stand Up' menu item is enabled when agent is sitting on selection // return sitting_on_selection(); // [RLVa:KB] - Checked: 2010-07-24 (RLVa-1.2.0g) | Added: RLVa-1.2.0g - return sitting_on_selection() && ( (!rlv_handler_t::isEnabled()) || (gRlvHandler.canStand()) ); + return sitting_on_selection() && ( (!rlv_handler_t::isEnabled()) || (RlvActions::canStand()) ); // [/RLVa:KB] } diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index c5c3e8c80ef77333f2f68b3bdae42ce12fb89e36..35da6e39ce2a4187429b825fb3f0b2dd9e58eca7 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -3196,21 +3196,20 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) case IM_LURE_USER: case IM_TELEPORT_REQUEST: { -// [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] - Checked: 2013-11-08 (RLVa-1.4.9) + // If we auto-accept the offer/request then this will override DnD status (but we'll still let the other party know later) + bool fRlvAutoAccept = (rlv_handler_t::isEnabled()) && + ( ((IM_LURE_USER == dialog) && (RlvActions::autoAcceptTeleportOffer(from_id))) || + ((IM_TELEPORT_REQUEST == dialog) && (RlvActions::autoAcceptTeleportRequest(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] + if (is_muted) { return; } // else if (is_do_not_disturb) -// [RLVa:KB] - Checked: 2010-12-11 (RLVa-1.2.2c) | Added: RLVa-1.2.2c - else if ( (is_do_not_disturb) && (!fRlvSummon) ) +// [RLVa:KB] - Checked: 2013-11-08 (RLVa-1.4.9) + else if ( (is_do_not_disturb) && (!fRlvAutoAccept) ) // [/RLVa:KB] { send_do_not_disturb_message(msg, from_id); @@ -3270,19 +3269,20 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) } } -// [RLVa:KB] - Checked: 2010-12-11 (RLVa-1.2.2c) | Modified: RLVa-1.2.2c +// [RLVa:KB] - Checked: 2013-11-08 (RLVa-1.4.9) if (rlv_handler_t::isEnabled()) { - if (!gRlvHandler.canTeleportViaLure(from_id)) + if ( ((IM_LURE_USER == dialog) && (!RlvActions::canAcceptTpOffer(from_id))) || + ((IM_TELEPORT_REQUEST == dialog) && (!RlvActions::canAcceptTpRequest(from_id))) ) { - RlvUtil::sendBusyMessage(from_id, RlvStrings::getString(RLV_STRING_BLOCKED_TPLURE_REMOTE)); + RlvUtil::sendBusyMessage(from_id, RlvStrings::getString(RLV_STRING_BLOCKED_TPLUREREQ_REMOTE)); if (is_do_not_disturb) send_do_not_disturb_message(msg, from_id); return; } - // Censor lure message if: 1) restricted from receiving IMs from the sender, or 2) @showloc=n restricted - if ( (!RlvActions::canReceiveIM(from_id)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ) + // Censor lure message if: 1) restricted from receiving IMs from the sender, or 2) teleport offer and @showloc=n restricted + if ( (!RlvActions::canReceiveIM(from_id)) || ((IM_LURE_USER == dialog) && (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))) ) { message = RlvStrings::getString(RLV_STRING_HIDDEN); } @@ -3338,17 +3338,18 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) params.substitutions = args; params.payload = payload; -// [RLVa:KB] - Checked: 2010-12-11 (RLVa-1.2.2c) | Modified: RLVa-1.2.2c - if ( (rlv_handler_t::isEnabled()) && ((gRlvHandler.hasBehaviour(RLV_BHVR_ACCEPTTP)) || (fRlvSummon)) ) +// [RLVa:KB] - Checked: 20103-11-08 (RLVa-1.4.9) + if ( (rlv_handler_t::isEnabled()) && (fRlvAutoAccept) ) { - gRlvHandler.setCanCancelTp(false); + if (IM_LURE_USER == dialog) + gRlvHandler.setCanCancelTp(false); if (is_do_not_disturb) send_do_not_disturb_message(msg, from_id); - LLNotifications::instance().forceResponse(LLNotification::Params("TeleportOffered").payload(payload), 0); + LLNotifications::instance().forceResponse(LLNotification::Params(params.name).payload(payload), 0); } else { - LLPostponedNotification::add<LLPostponedOfferNotification>( params, from_id, false); + LLPostponedNotification::add<LLPostponedOfferNotification>(params, from_id, false); } // [/RLVa:KB] // LLPostponedNotification::add<LLPostponedOfferNotification>( params, from_id, false); diff --git a/indra/newview/rlvactions.cpp b/indra/newview/rlvactions.cpp index 8f91f5f9f749858adf6726fb6d248fff0aad663b..289e6172a12af18b82c12ca0364a3193e989e84d 100644 --- a/indra/newview/rlvactions.cpp +++ b/indra/newview/rlvactions.cpp @@ -16,6 +16,7 @@ #include "llviewerprecompiledheaders.h" #include "llimview.h" +#include "llvoavatarself.h" #include "rlvactions.h" #include "rlvhandler.h" @@ -59,6 +60,37 @@ bool RlvActions::canStartIM(const LLUUID& idRecipient) ( (!gRlvHandler.hasBehaviour(RLV_BHVR_STARTIMTO)) || (!gRlvHandler.isException(RLV_BHVR_STARTIMTO, idRecipient)) ) ); } +// Checked: 2010-12-11 (RLVa-1.2.2) +bool RlvActions::canAcceptTpOffer(const LLUUID& idSender) +{ + return ((!gRlvHandler.hasBehaviour(RLV_BHVR_TPLURE)) || (gRlvHandler.isException(RLV_BHVR_TPLURE, idSender))) && (canStand()); +} + +// Checked: 2013-11-08 (RLVa-1.4.9) +bool RlvActions::autoAcceptTeleportOffer(const LLUUID& idSender) +{ + return ((idSender.notNull()) && (gRlvHandler.isException(RLV_BHVR_ACCEPTTP, idSender))) || (gRlvHandler.hasBehaviour(RLV_BHVR_ACCEPTTP)); +} + +// Checked: 2013-11-08 (RLVa-1.4.9) +bool RlvActions::canAcceptTpRequest(const LLUUID& idSender) +{ + return (!gRlvHandler.hasBehaviour(RLV_BHVR_TPREQUEST)) || (gRlvHandler.isException(RLV_BHVR_TPREQUEST, idSender)); +} + +// Checked: 2013-11-08 (RLVa-1.4.9) +bool RlvActions::autoAcceptTeleportRequest(const LLUUID& idRequester) +{ + return ((idRequester.notNull()) && (gRlvHandler.isException(RLV_BHVR_ACCEPTTPREQUEST, idRequester))) || (gRlvHandler.hasBehaviour(RLV_BHVR_ACCEPTTPREQUEST)); +} + +// Checked: 2010-03-07 (RLVa-1.2.0) +bool RlvActions::canStand() +{ + // NOTE: return FALSE only if we're @unsit=n restricted and the avie is currently sitting on something and TRUE for everything else + return (!gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || ((isAgentAvatarValid()) && (!gAgentAvatarp->isSitting())); +} + // Checked: 2013-05-10 (RLVa-1.4.9) bool RlvActions::hasBehaviour(ERlvBehaviour eBhvr) { @@ -78,4 +110,10 @@ bool RlvActions::hasOpenGroupSession(const LLUUID& idGroup) return (idGroup.notNull()) && (LLIMMgr::instance().hasSession(idGroup)); } +// Checked: 2013-11-08 (RLVa-1.4.9) +bool RlvActions::isRlvEnabled() +{ + return RlvHandler::isEnabled(); +} + // ============================================================================ diff --git a/indra/newview/rlvactions.h b/indra/newview/rlvactions.h index b586e2dbc1c73917a9c3b08948efd90174031a6f..9b77ed4b6afda0f9feca23e4c27b70c0e2cc18e9 100644 --- a/indra/newview/rlvactions.h +++ b/indra/newview/rlvactions.h @@ -25,8 +25,10 @@ class RlvActions { + // ============= + // Communication + // ============= public: - /* * Returns true if the user is allowed to receive IMs from the specified sender (can be an avatar or a group) */ @@ -42,6 +44,45 @@ class RlvActions */ static bool canStartIM(const LLUUID& idRecipient); // @startim and @startimto + // ======== + // Movement + // ======== +public: + /* + * Returns true if the user can accept an incoming teleport offer from the specified avatar + */ + static bool canAcceptTpOffer(const LLUUID& idSender); + + /* + * Returns true if a teleport offer from the specified avatar should be auto-accepted + * (pass the null UUID to check if all teleport offers should be auto-accepted regardless of sender) + */ + static bool autoAcceptTeleportOffer(const LLUUID& idSender); + + /* + * Returns true if the user can accept an incoming teleport request from the specified avatar + */ + static bool canAcceptTpRequest(const LLUUID& idSender); + + /* + * Returns true if a teleport request from the specified avatar should be auto-accepted + * (pass the null UUID to check if all teleport requests should be auto-accepted regardless of requester) + */ + static bool autoAcceptTeleportRequest(const LLUUID& idRequester); + + // ================= + // World interaction + // ================= +public: + /* + * Returns true if the user can stand up (returns true if the user isn't currently sitting) + */ + static bool canStand(); + + // ================ + // Helper functions + // ================ +public: /* * Convenience function to check for a behaviour without having to include rlvhandler.h. * Do NOT call this function if speed is important (i.e. per-frame) @@ -53,6 +94,11 @@ class RlvActions */ static bool hasOpenP2PSession(const LLUUID& idAgent); static bool hasOpenGroupSession(const LLUUID& idGroup); + + /* + * Convenience function to check if RLVa is enabled without having to include rlvhandler.h + */ + static bool isRlvEnabled(); }; // ============================================================================ diff --git a/indra/newview/rlvcommon.cpp b/indra/newview/rlvcommon.cpp index ede9df1de0a6837abbe62d3f637f7dcc4815903e..7c3a772fc5ac7caade36fc246243d36524041467 100644 --- a/indra/newview/rlvcommon.cpp +++ b/indra/newview/rlvcommon.cpp @@ -27,6 +27,7 @@ #include "llviewerstats.h" #include "llworld.h" +#include "rlvactions.h" #include "rlvcommon.h" #include "rlvhelper.h" #include "rlvhandler.h" @@ -114,7 +115,7 @@ void RlvSettings::initClass() { if ( (!LLApp::isQuitting()) && (gSavedPerAccountSettings.controlExists(RLV_SETTING_LOGINLASTLOCATION)) ) { - BOOL fValue = (gRlvHandler.hasBehaviour(RLV_BHVR_TPLOC)) || (!gRlvHandler.canStand()); + BOOL fValue = (gRlvHandler.hasBehaviour(RLV_BHVR_TPLOC)) || (!RlvActions::canStand()); if (gSavedPerAccountSettings.getBOOL(RLV_SETTING_LOGINLASTLOCATION) != fValue) { gSavedPerAccountSettings.setBOOL(RLV_SETTING_LOGINLASTLOCATION, fValue); diff --git a/indra/newview/rlvdefines.h b/indra/newview/rlvdefines.h index cc20f8924f2e97a0a8b7b6c072a6c99dd5bd64f4..208875a15adea6eff132666b2d1614f21b135032 100644 --- a/indra/newview/rlvdefines.h +++ b/indra/newview/rlvdefines.h @@ -156,11 +156,13 @@ enum ERlvBehaviour { RLV_BHVR_TPLM, // "tplm" RLV_BHVR_TPLOC, // "tploc" RLV_BHVR_TPLURE, // "tplure" + RLV_BHVR_TPREQUEST, // "tprequest" RLV_BHVR_VIEWNOTE, // "viewnote" RLV_BHVR_VIEWSCRIPT, // "viewscript" RLV_BHVR_VIEWTEXTURE, // "viewtexture" RLV_BHVR_ACCEPTPERMISSION, // "acceptpermission" RLV_BHVR_ACCEPTTP, // "accepttp" + RLV_BHVR_ACCEPTTPREQUEST, // "accepttprequest" RLV_BHVR_ALLOWIDLE, // "allowidle" RLV_BHVR_EDIT, // "edit" RLV_BHVR_EDITOBJ, // "editobj" @@ -336,7 +338,7 @@ enum ERlvAttachGroupType #define RLV_STRING_BLOCKED_STARTCONF "blocked_startconf" #define RLV_STRING_BLOCKED_STARTIM "blocked_startim" #define RLV_STRING_BLOCKED_TELEPORT "blocked_teleport" -#define RLV_STRING_BLOCKED_TPLURE_REMOTE "blocked_tplure_remote" +#define RLV_STRING_BLOCKED_TPLUREREQ_REMOTE "blocked_tplurerequest_remote" #define RLV_STRING_BLOCKED_VIEWXXX "blocked_viewxxx" #define RLV_STRING_BLOCKED_WIREFRAME "blocked_wireframe" diff --git a/indra/newview/rlvfloaters.cpp b/indra/newview/rlvfloaters.cpp index edb1bf21d264edcc52c9f516fec08810827f9601..2450aa0bab443f7edb6328c0a3dfbdb6de0c119f 100644 --- a/indra/newview/rlvfloaters.cpp +++ b/indra/newview/rlvfloaters.cpp @@ -95,7 +95,9 @@ bool rlvGetShowException(ERlvBehaviour eBhvr) case RLV_BHVR_RECVIM: case RLV_BHVR_STARTIM: case RLV_BHVR_TPLURE: + case RLV_BHVR_TPREQUEST: case RLV_BHVR_ACCEPTTP: + case RLV_BHVR_ACCEPTTPREQUEST: return true; default: return false; diff --git a/indra/newview/rlvhandler.cpp b/indra/newview/rlvhandler.cpp index 22dadacf5f24f38e0655cadc121cbfa720520076..53b843543c3ab75398fd793028cc9a9bdac9ffc0 100644 --- a/indra/newview/rlvhandler.cpp +++ b/indra/newview/rlvhandler.cpp @@ -672,13 +672,6 @@ bool RlvHandler::canSit(LLViewerObject* pObj, const LLVector3& posOffset /*= LLV (dist_vec_squared(gAgent.getPositionGlobal(), pObj->getPositionGlobal() + LLVector3d(posOffset)) < 1.5f * 1.5f) ); } -// Checked: 2010-03-07 (RLVa-1.2.0c) | Added: RLVa-1.2.0a -bool RlvHandler::canStand() const -{ - // NOTE: return FALSE only if we're @unsit=n restricted and the avie is currently sitting on something and TRUE for everything else - return (!hasBehaviour(RLV_BHVR_UNSIT)) || ((isAgentAvatarValid()) && (!gAgentAvatarp->isSitting())); -} - // Checked: 2010-04-11 (RLVa-1.3.0h) | Modified: RLVa-1.3.0h bool RlvHandler::canTouch(const LLViewerObject* pObj, const LLVector3& posOffset /*=LLVector3::zero*/) const { @@ -1326,7 +1319,9 @@ ERlvCmdRet RlvHandler::processAddRemCommand(const RlvCommand& rlvCmd) case RLV_BHVR_RECVIM: // @recvim[:<uuid>]=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h case RLV_BHVR_STARTIM: // @startim[:<uuid>]=n|y - Checked: 2011-04-11 (RLVa-1.3.0h) | Added: RLVa-1.3.0h case RLV_BHVR_TPLURE: // @tplure[:<uuid>]=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h - case RLV_BHVR_ACCEPTTP: // @accepttp[:<uuid>]=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h + case RLV_BHVR_TPREQUEST: // @tprequest[:<uuid>]=n|y - Checked: 2013-11-08 (RLVa-1.4.9) + case RLV_BHVR_ACCEPTTP: // @accepttp[:<uuid>]=n|y - Checked: 2009-12-05 (RLVa-1.1.0) + case RLV_BHVR_ACCEPTTPREQUEST: // @accepttprequest[:<uuid>]=n|y - Checked: 2013-11-08 (RLVa-1.4.9) case RLV_BHVR_TOUCHATTACH: // @touchattach[:<uuid>=n|y - Checked: 2010-01-01 (RLVa-1.1.0l) | Added: RLVa-1.1.0l #ifdef RLV_EXTENSION_CMD_TOUCHXXX case RLV_BHVR_TOUCHHUD: // @touchhud[:<uuid>=n|y - Checked: 2010-01-01 (RLVa-1.1.0l) | Added: RLVa-1.1.0l diff --git a/indra/newview/rlvhandler.h b/indra/newview/rlvhandler.h index 21d907a32252ae465c0e7c01537440547b57fad2..385fb2b0a595b9d06aae3af5a1db2daa9d87d3fb 100644 --- a/indra/newview/rlvhandler.h +++ b/indra/newview/rlvhandler.h @@ -97,8 +97,6 @@ class RlvHandler : public LLOldEvents::LLSimpleListener bool canEdit(const LLViewerObject* pObj) const; // @edit and @editobj bool canShowHoverText(const 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 bool filterChat(std::string& strUTF8Text, bool fFilterEmote) const; // @sendchat, @recvchat and @redirchat bool redirectChatOrEmote(const std::string& strUTF8Test) const; // @redirchat and @rediremote @@ -255,12 +253,6 @@ inline bool RlvHandler::canShowHoverText(const LLViewerObject *pObj) const (isException(RLV_BHVR_SHOWHOVERTEXT, pObj->getID(), RLV_CHECK_PERMISSIVE)) ) ); } -// 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()); -} - inline bool RlvHandler::hasBehaviour(ERlvBehaviour eBhvr, const std::string& strOption) const { return hasBehaviourExcept(eBhvr, strOption, LLUUID::null); diff --git a/indra/newview/rlvhelper.cpp b/indra/newview/rlvhelper.cpp index 6bfc6137c0e03bebc0af6d6cca3aa48da43d2e06..23099ef1c932ec2412e6572f54077e31f30ed1d7 100644 --- a/indra/newview/rlvhelper.cpp +++ b/indra/newview/rlvhelper.cpp @@ -163,9 +163,9 @@ void RlvCommand::initLookupTable() "unsharedwear", "unsharedunwear", "emote", "sendchat", "recvchat", "recvchatfrom", "recvemote", "recvemotefrom", "redirchat", "rediremote", "chatwhisper", "chatnormal", "chatshout", "sendchannel", "sendim", "sendimto", "recvim", "recvimfrom", "startim", "startimto", "permissive", "notify", "showinv", "showminimap", "showworldmap", "showloc", - "shownames", "showhovertext", "showhovertexthud", "showhovertextworld", "showhovertextall", "tplm", "tploc", "tplure", - "viewnote", "viewscript", "viewtexture", "acceptpermission", "accepttp", "allowidle", "edit", "editobj", "rez", "fartouch", - "interact", "touchthis", "touchattach", "touchattachself", "touchattachother", "touchhud", "touchworld", "touchall", + "shownames", "showhovertext", "showhovertexthud", "showhovertextworld", "showhovertextall", "tplm", "tploc", "tplure", "tprequest", + "viewnote", "viewscript", "viewtexture", "acceptpermission", "accepttp", "accepttprequest", "allowidle", "edit", "editobj", "rez", + "fartouch", "interact", "touchthis", "touchattach", "touchattachself", "touchattachother", "touchhud", "touchworld", "touchall", "touchme", "fly", "setgroup", "unsit", "sit", "sittp", "standtp", "setdebug", "setenv", "alwaysrun", "temprun", "detachme", "attachover", "attachthis", "attachthisover", "attachthis_except", "detachthis", "detachthis_except", "attachall", "attachallover", "detachall", "attachallthis", "attachallthis_except", "attachallthisover", "detachallthis", diff --git a/indra/newview/rlvhelper.h b/indra/newview/rlvhelper.h index d49ad1cf43d78fed9dff63ca5b394fbc4c309fe2..4280ded9c64da29fa4ed64f613eac0e5e30bb637 100644 --- a/indra/newview/rlvhelper.h +++ b/indra/newview/rlvhelper.h @@ -434,6 +434,7 @@ inline bool RlvCommand::hasStrictVariant(ERlvBehaviour eBhvr) case RLV_BHVR_RECVIM: case RLV_BHVR_SENDIM: case RLV_BHVR_TPLURE: + case RLV_BHVR_TPREQUEST: case RLV_BHVR_SENDCHANNEL: return true; default: diff --git a/indra/newview/skins/default/xui/en/rlva_strings.xml b/indra/newview/skins/default/xui/en/rlva_strings.xml index bf55539891ea8b7ac3571445c0027e2cfe583a14..0e3c27ca0a945d5b12a5137b2894d6137f32c587 100644 --- a/indra/newview/skins/default/xui/en/rlva_strings.xml +++ b/indra/newview/skins/default/xui/en/rlva_strings.xml @@ -91,7 +91,7 @@ <key>blocked_recvim_remote</key> <map> <key>value</key> - <string>The Resident you messaged is prevented from reading your instant messages at the moment, please try again later.</string> + <string>The Resident you messaged is currently prevented from reading your instant messages at the moment, please try again later.</string> <key>description</key> <string>Sent to the remote party when their IM was blocked</string> <key>label</key> @@ -99,14 +99,14 @@ <key>customizable</key> <boolean>1</boolean> </map> - <key>blocked_tplure_remote</key> + <key>blocked_tplurerequest_remote</key> <map> <key>value</key> - <string>The Resident you invited is prevented from accepting teleport offers. Please try again later.</string> + <string>The Resident is currently prevented from accepting. Please try again later.</string> <key>description</key> - <string>Sent to the remote party when their teleport offer was blocked</string> + <string>Sent to the remote party when their teleport offer or request was blocked</string> <key>label</key> - <string>Blocked teleport offer (remote)</string> + <string>Blocked teleport offer/request (remote)</string> <key>customizable</key> <boolean>1</boolean> </map>