From 0ef8e99a361d253b2709cf8fc4717e65aa54485f Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Tue, 22 Sep 2009 21:03:08 -0700 Subject: Fixed RLVa issue in LLNetMap the right way (thanks Kitty) --- linden/indra/newview/llnetmap.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'linden/indra/newview') diff --git a/linden/indra/newview/llnetmap.cpp b/linden/indra/newview/llnetmap.cpp index cac35b9..97272f4 100644 --- a/linden/indra/newview/llnetmap.cpp +++ b/linden/indra/newview/llnetmap.cpp @@ -380,7 +380,7 @@ void LLNetMap::draw() } // [RLVa:KB] - if ( rlv_handler_t::isEnabled() && !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) ) + 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. @@ -595,7 +595,7 @@ BOOL LLNetMap::handleToolTip( S32 x, S32 y, std::string& msg, LLRect* sticky_rec if(mClosestAgentToCursor.notNull() && gCacheName->getFullName(mClosestAgentToCursor, fullname)) { // [RLVa:KB] - if ( rlv_handler_t::isEnabled() && !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) ) + if ( gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) ) { // User is not allowed to see who it is, due to RLV settings. msg.append(rlv_handler_t::cstrHidden); @@ -609,7 +609,7 @@ BOOL LLNetMap::handleToolTip( S32 x, S32 y, std::string& msg, LLRect* sticky_rec } // [RLVa:KB] - if (rlv_handler_t::isEnabled() && !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) + 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 ); -- cgit v1.1 From a365436c6419a6c9bde020c373252aca6134fe61 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Tue, 22 Sep 2009 21:06:46 -0700 Subject: Clarifed Mini-Map menu option: 'Show Map' to 'Show World Map' --- linden/indra/newview/skins/default/xui/en-us/menu_mini_map.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linden/indra/newview') diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_mini_map.xml b/linden/indra/newview/skins/default/xui/en-us/menu_mini_map.xml index 0172b41..d1f5fc8 100644 --- a/linden/indra/newview/skins/default/xui/en-us/menu_mini_map.xml +++ b/linden/indra/newview/skins/default/xui/en-us/menu_mini_map.xml @@ -25,7 +25,7 @@ - -- cgit v1.1 From 4905d42add2de0d897591f136734b071650e70f8 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Tue, 22 Sep 2009 22:23:51 -0700 Subject: Applied particle chat feature from Emerald viewer (tell an object it's selected on channel 9000) --- linden/indra/newview/app_settings/settings.xml | 11 +++++ linden/indra/newview/llvoavatar.cpp | 65 ++++++++++++++++++++++++++ linden/indra/newview/llvoavatar.h | 3 ++ 3 files changed, 79 insertions(+) (limited to 'linden/indra/newview') diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index 194e95e..087c92f 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml @@ -5559,6 +5559,17 @@ Value 0 + ParticleChat + + Comment + Chat target of effect beam to channel 9000 + Persist + 1 + Type + Boolean + Value + 1 + PerAccountSettingsFile Comment diff --git a/linden/indra/newview/llvoavatar.cpp b/linden/indra/newview/llvoavatar.cpp index 24272d8..431ef96 100644 --- a/linden/indra/newview/llvoavatar.cpp +++ b/linden/indra/newview/llvoavatar.cpp @@ -295,6 +295,9 @@ F32 LLVOAvatar::sUnbakedTime = 0.f; F32 LLVOAvatar::sUnbakedUpdateTime = 0.f; F32 LLVOAvatar::sGreyTime = 0.f; F32 LLVOAvatar::sGreyUpdateTime = 0.f; +LLVector3d LLVOAvatar::sBeamLastAt; +int LLVOAvatar::sPartsNow; + struct LLAvatarTexData { @@ -3445,6 +3448,26 @@ void LLVOAvatar::idleUpdateTractorBeam() if (!needsRenderBeam() || !mIsBuilt) { mBeam = NULL; + if(gSavedSettings.getBOOL("ParticleChat")) + { + if(sPartsNow != FALSE) + { + sPartsNow = FALSE; + LLMessageSystem* msg = gMessageSystem; + msg->newMessageFast(_PREHASH_ChatFromViewer); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + msg->nextBlockFast(_PREHASH_ChatData); + msg->addStringFast(_PREHASH_Message, "stop"); + msg->addU8Fast(_PREHASH_Type, CHAT_TYPE_WHISPER); + msg->addS32("Channel", 9000); + + gAgent.sendReliableMessage(); + sBeamLastAt = LLVector3d::zero; + LLViewerStats::getInstance()->incStat(LLViewerStats::ST_CHAT_COUNT); + } + } } else if (!mBeam || mBeam->isDead()) { @@ -3463,6 +3486,48 @@ void LLVOAvatar::idleUpdateTractorBeam() { // get point from pointat effect mBeam->setPositionGlobal(gAgent.mPointAt->getPointAtPosGlobal()); + + if(gSavedSettings.getBOOL("ParticleChat")) + { + if(sPartsNow != TRUE) + { + sPartsNow = TRUE; + LLMessageSystem* msg = gMessageSystem; + msg->newMessageFast(_PREHASH_ChatFromViewer); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + msg->nextBlockFast(_PREHASH_ChatData); + msg->addStringFast(_PREHASH_Message, "start"); + msg->addU8Fast(_PREHASH_Type, CHAT_TYPE_WHISPER); + msg->addS32("Channel", 9000); + + gAgent.sendReliableMessage(); + + LLViewerStats::getInstance()->incStat(LLViewerStats::ST_CHAT_COUNT); + } + //LLVector3d a = sBeamLastAt-gAgent.mPointAt->getPointAtPosGlobal(); + //if(a.length > 2) + if( (sBeamLastAt-gAgent.mPointAt->getPointAtPosGlobal()).length() > .2) + //if(sBeamLastAt!=gAgent.mPointAt->getPointAtPosGlobal()) + { + sBeamLastAt = gAgent.mPointAt->getPointAtPosGlobal(); + + LLMessageSystem* msg = gMessageSystem; + msg->newMessageFast(_PREHASH_ChatFromViewer); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + msg->nextBlockFast(_PREHASH_ChatData); + msg->addStringFast(_PREHASH_Message, llformat("<%.6f, %.6f, %.6f>",(F32)(sBeamLastAt.mdV[VX]),(F32)(sBeamLastAt.mdV[VY]),(F32)(sBeamLastAt.mdV[VZ]))); + msg->addU8Fast(_PREHASH_Type, CHAT_TYPE_WHISPER); + msg->addS32("Channel", 9000); // *TODO: make configurable + + gAgent.sendReliableMessage(); + } + + } + mBeam->triggerLocal(); } else if (selection->getFirstRootObject() && diff --git a/linden/indra/newview/llvoavatar.h b/linden/indra/newview/llvoavatar.h index 9806ceb..8607383 100644 --- a/linden/indra/newview/llvoavatar.h +++ b/linden/indra/newview/llvoavatar.h @@ -918,6 +918,9 @@ public: static F32 sGreyTime; // Total seconds with >=1 grey avatars static F32 sGreyUpdateTime; // Last time stats were updated (to prevent multiple updates per frame) + static int sPartsNow; + static LLVector3d sBeamLastAt; + //-------------------------------------------------------------------- // Texture Layer Sets and Global Colors //-------------------------------------------------------------------- -- cgit v1.1 From da5c9c0ae9ca3fa1eb1430ab48e49491a8524dd7 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Thu, 24 Sep 2009 14:01:21 -0700 Subject: Applied RLVa patch for Imprudence 1.2 by Kitty Barnett --- linden/indra/newview/llfloatermap.cpp | 34 ++++++++++++++++++++++++++ linden/indra/newview/llinventorybridge.cpp | 10 +++++++- linden/indra/newview/llnetmap.cpp | 33 +++++++++++++------------ linden/indra/newview/llpanelpermissions.cpp | 5 +++- linden/indra/newview/llwindlightremotectrl.cpp | 11 +++++++++ 5 files changed, 76 insertions(+), 17 deletions(-) (limited to 'linden/indra/newview') diff --git a/linden/indra/newview/llfloatermap.cpp b/linden/indra/newview/llfloatermap.cpp index 3be891e..f7f51fd 100644 --- a/linden/indra/newview/llfloatermap.cpp +++ b/linden/indra/newview/llfloatermap.cpp @@ -240,6 +240,13 @@ void LLFloaterMap::populateRadar() std::string fullname = getSelectedName(avatar_ids[i]); if (!fullname.empty()) { +// [RLVa:KB] - Alternate: Imprudence-1.2.0 + if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) + { + fullname = gRlvHandler.getAnonym(fullname); + } +// [/RLVa:KB] + std::string mute_text = LLMuteList::getInstance()->isMuted(avatar_ids[i]) ? getString("muted") : ""; element["id"] = avatar_ids[i]; element["columns"][0]["column"] = "avatar_name"; @@ -314,6 +321,33 @@ void LLFloaterMap::toggleButtons() childSetEnabled("unmute_btn", enable_unmute); childSetEnabled("ar_btn", enable); childSetEnabled("estate_eject_btn", enable_estate); + +// [RLVa:KB] - Imprudence-1.2.0 + // Bit clumsy, but this way the RLV stuff is in its own separate block and keeps the code above clean - Kitty + if ( (rlv_handler_t::isEnabled()) && (mSelectedAvatar.notNull()) ) + { + if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) + { + childSetEnabled("im_btn", FALSE); + childSetEnabled("profile_btn", FALSE); + childSetEnabled("invite_btn", FALSE); + childSetEnabled("add_btn", FALSE); + childSetEnabled("mute_btn", FALSE); + childSetEnabled("unmute_btn", FALSE); + } + + // Even though the avie is in the same sim (so they already know where we are) the tp would just get blocked by different code + // so it's actually less confusing to the user if we just disable the teleport button here so they'll at least have a visual cue + BOOL rlv_enable_tp = (!gRlvHandler.hasBehaviour(RLV_BHVR_TPLURE)) || (gRlvHandler.isException(RLV_BHVR_TPLURE, mSelectedAvatar)); + if ( (rlv_enable_tp) && (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ) + { + const LLRelationship* pBuddyInfo = LLAvatarTracker::instance().getBuddyInfo(mSelectedAvatar); + if ( ((!pBuddyInfo) || (!pBuddyInfo->isOnline()) || (!pBuddyInfo->isRightGrantedTo(LLRelationship::GRANT_MAP_LOCATION))) ) + rlv_enable_tp = FALSE; + } + childSetEnabled("offer_teleport_btn", rlv_enable_tp); + } +// [/RLVa:KB] } BOOL LLFloaterMap::getKickable(const LLUUID &agent_id) diff --git a/linden/indra/newview/llinventorybridge.cpp b/linden/indra/newview/llinventorybridge.cpp index 19a5ade..618c4f9 100644 --- a/linden/indra/newview/llinventorybridge.cpp +++ b/linden/indra/newview/llinventorybridge.cpp @@ -4241,7 +4241,15 @@ void wear_attachments_on_avatar(const std::set& item_ids, BOOL remove) { if ( (gInventory.isObjectDescendentOf(*it, gAgent.getInventoryRootID())) ) { - items.put(item); +// items.put(item); +// [RLVa:KB] - Checked: 2009-09-11 (RLVa-1.0.2c) | Modified: RLVa-1.0.2c + LLViewerJointAttachment* pAttachPt = NULL; + if ( (!rlv_handler_t::isEnabled()) || (RlvSettings::getEnableWear()) || (!gRlvHandler.hasLockedAttachment()) || + (((pAttachPt = gRlvHandler.getAttachPoint(item, true)) != NULL) && (gRlvHandler.isDetachable(pAttachPt->getObject()))) ) + { + items.put(item); + } +// [/RLVa:KB] } else if ( (item->isComplete()) ) { diff --git a/linden/indra/newview/llnetmap.cpp b/linden/indra/newview/llnetmap.cpp index 97272f4..f055dbc 100644 --- a/linden/indra/newview/llnetmap.cpp +++ b/linden/indra/newview/llnetmap.cpp @@ -379,7 +379,7 @@ void LLNetMap::draw() } } -// [RLVa:KB] +// [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, @@ -594,21 +594,14 @@ 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] - if ( gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) ) - { - // User is not allowed to see who it is, due to RLV settings. - msg.append(rlv_handler_t::cstrHidden); - } - else - { - msg.append(fullname); - msg.append("\n"); - } -// [/RLVa:KB] +// [RLVa:KB] - Alternate: Imprudence-1.2.0 + // User is not allowed to see who it is, due to RLV settings. + msg.append( (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ? fullname : gRlvHandler.getAnonym(fullname) ); + msg.append("\n"); + // [/RLVa:KB] } -// [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. @@ -1018,6 +1011,13 @@ 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)) + { + return true; + } +// [/RLVa:KB] + LLNetMap *self = mPtr; LLFloaterAvatarInfo::show(self->mClosestAgentAtLastRightClick); return true; @@ -1026,6 +1026,9 @@ bool LLNetMap::LLShowAgentProfile::handleEvent(LLPointer event, const L bool LLNetMap::LLEnableProfile::handleEvent(LLPointer event, const LLSD& userdata) { LLNetMap *self = mPtr; - self->findControl(userdata["control"].asString())->setValue(self->isAgentUnderCursor()); + //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] return true; } diff --git a/linden/indra/newview/llpanelpermissions.cpp b/linden/indra/newview/llpanelpermissions.cpp index 24bbab6..aa14a90 100644 --- a/linden/indra/newview/llpanelpermissions.cpp +++ b/linden/indra/newview/llpanelpermissions.cpp @@ -348,7 +348,10 @@ void LLPanelPermissions::refresh() fRlvEnableOwner && owners_identical && (mOwnerID.notNull() || LLSelectMgr::getInstance()->selectIsGroupOwned())); // [/RLVa:KB] - if (owner_name != last_owner_name) + //if (owner_name != last_owner_name) +// [RLVa:KB] + if ( (owner_name != last_owner_name) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ) +// [/RLVa:KB] { childSetText("Last Owner Name", last_owner_name); childSetEnabled("Last Owner Name", TRUE); diff --git a/linden/indra/newview/llwindlightremotectrl.cpp b/linden/indra/newview/llwindlightremotectrl.cpp index 591b413..510e1df 100644 --- a/linden/indra/newview/llwindlightremotectrl.cpp +++ b/linden/indra/newview/llwindlightremotectrl.cpp @@ -41,6 +41,9 @@ #include "llwlparammanager.h" #include "llviewercontrol.h" +// [RLVa:KB] - Alternate: Imprudence-1.2.0 +#include "rlvhandler.h" +// [/RLVa:KB] class LLWindlightRemoteObserver : public LLWLPresetsObserver { @@ -85,6 +88,14 @@ void LLWindlightRemoteCtrl::draw() } } +// [RLVa:KB] - Alternate: Imprudence-1.2.0 + if (rlv_handler_t::isEnabled()) + { + childSetEnabled("Environment", !gRlvHandler.hasBehaviour(RLV_BHVR_SETENV)); + mPresetsCombo->setEnabled(!gRlvHandler.hasBehaviour(RLV_BHVR_SETENV)); + } +// [/RLVA:KB] + LLPanel::draw(); } -- cgit v1.1 From 17ecf79fe82391cd5f9f16e975a3762ebde212e0 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Thu, 24 Sep 2009 22:16:56 -0700 Subject: Fixed Add button being enabled for friends in the radar --- linden/indra/newview/llfloatermap.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'linden/indra/newview') diff --git a/linden/indra/newview/llfloatermap.cpp b/linden/indra/newview/llfloatermap.cpp index f7f51fd..6d23ab4 100644 --- a/linden/indra/newview/llfloatermap.cpp +++ b/linden/indra/newview/llfloatermap.cpp @@ -297,12 +297,14 @@ void LLFloaterMap::toggleButtons() BOOL enable_unmute = FALSE; BOOL enable_track = FALSE; BOOL enable_estate = FALSE; + BOOL enable_friend = FALSE; if (childHasFocus("RadarPanel")) { enable = mSelectedAvatar.notNull() ? visibleItemsSelected() : FALSE; enable_unmute = mSelectedAvatar.notNull() ? LLMuteList::getInstance()->isMuted(mSelectedAvatar) : FALSE; enable_track = gAgent.isGodlike() || is_agent_mappable(mSelectedAvatar); enable_estate = getKickable(mSelectedAvatar); + enable_friend = !is_agent_friend(mSelectedAvatar); } else { -- cgit v1.1 From 51208d3c90e4eadfa9f79e8645cab1cd73ca9fa7 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Thu, 24 Sep 2009 22:17:19 -0700 Subject: Clarified 'Track' button tooltip in radar --- linden/indra/newview/skins/default/xui/en-us/floater_mini_map.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linden/indra/newview') diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_mini_map.xml b/linden/indra/newview/skins/default/xui/en-us/floater_mini_map.xml index 3485812..54f7775 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_mini_map.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_mini_map.xml @@ -51,7 +51,7 @@ tool_tip="Offer this friend a teleport to your current location" width="80" />