From 5a7455cb60af2be0e41f32ee4b5a264a00ef91ed Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Mon, 12 Apr 2010 21:37:21 -0700 Subject: From Emerald: added option to rez objects under the proper land group to prevent autoreturn --- linden/indra/newview/app_settings/settings.xml | 11 +++++++++ linden/indra/newview/lltooldraganddrop.cpp | 26 ++++++++++++++++++++++ linden/indra/newview/lltoolplacer.cpp | 26 +++++++++++++++++++++- .../default/xui/en-us/floater_build_options.xml | 9 +++++--- 4 files changed, 68 insertions(+), 4 deletions(-) (limited to 'linden') diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index 8984e04..9f2854b 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml @@ -37,6 +37,17 @@ Value 0 + RezWithLandGroup + + Comment + Attempts to rez objects in the lands group if you're apart of it + Persist + 1 + Type + Boolean + Value + 0 + ShadowsEnabled Comment diff --git a/linden/indra/newview/lltooldraganddrop.cpp b/linden/indra/newview/lltooldraganddrop.cpp index aa5bfad..a3ed16b 100644 --- a/linden/indra/newview/lltooldraganddrop.cpp +++ b/linden/indra/newview/lltooldraganddrop.cpp @@ -69,6 +69,9 @@ #include "object_flags.h" #include "llimview.h" +#include "llparcel.h" // RezWithLandGroup +#include "llviewerparcelmgr.h" // RezWithLandGroup + // MAX ITEMS is based on (sizeof(uuid)+2) * count must be < MTUBYTES // or 18 * count < 1200 => count < 1200/18 => 66. I've cut it down a @@ -1357,6 +1360,29 @@ void LLToolDragAndDrop::dropObject(LLViewerObject* raycast_target, msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); msg->addUUIDFast(_PREHASH_GroupID, gAgent.getGroupID()); + // RezWithLandGroup 2009-05, If avatar is in land group/land owner group, + //it rezzes it with it to prevent autoreturn/whatever... + if ( gSavedSettings.getBOOL("RezWithLandGroup") ) + { + LLParcel *parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); + if ( gAgent.isInGroup(parcel->getGroupID()) ) + { + msg->addUUIDFast(_PREHASH_GroupID, parcel->getGroupID()); + } + else if ( gAgent.isInGroup(parcel->getOwnerID()) ) + { + msg->addUUIDFast(_PREHASH_GroupID, parcel->getOwnerID()); + } + else + { + msg->addUUIDFast(_PREHASH_GroupID, gAgent.getGroupID()); + } + } + else + { + msg->addUUIDFast(_PREHASH_GroupID, gAgent.getGroupID()); + } + msg->nextBlock("RezData"); // if it's being rezzed from task inventory, we need to enable // saving it back into the task inventory. diff --git a/linden/indra/newview/lltoolplacer.cpp b/linden/indra/newview/lltoolplacer.cpp index 84e0203..d52d97c 100644 --- a/linden/indra/newview/lltoolplacer.cpp +++ b/linden/indra/newview/lltoolplacer.cpp @@ -65,6 +65,9 @@ #include "llviewercamera.h" #include "llviewerstats.h" +#include "llparcel.h" // RezWithLandGroup +#include "llviewerparcelmgr.h" // RezWithLandGroup + const LLVector3 DEFAULT_OBJECT_SCALE(0.5f, 0.5f, 0.5f); //static @@ -255,7 +258,28 @@ BOOL LLToolPlacer::addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics ) gMessageSystem->nextBlockFast(_PREHASH_AgentData); gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - gMessageSystem->addUUIDFast(_PREHASH_GroupID, gAgent.getGroupID()); + // RezWithLandGroup 2009-05, If avatar is in land group/land owner group, + // it rezzes it with it to prevent autoreturn/whatever + if ( gSavedSettings.getBOOL("RezWithLandGroup") ) + { + LLParcel *parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); + if ( gAgent.isInGroup(parcel->getGroupID()) ) + { + gMessageSystem->addUUIDFast(_PREHASH_GroupID, parcel->getGroupID()); + } + else if ( gAgent.isInGroup(parcel->getOwnerID()) ) + { + gMessageSystem->addUUIDFast(_PREHASH_GroupID, parcel->getOwnerID()); + } + else + { + gMessageSystem->addUUIDFast(_PREHASH_GroupID, gAgent.getGroupID()); + } + } + else + { + gMessageSystem->addUUIDFast(_PREHASH_GroupID, gAgent.getGroupID()); + } gMessageSystem->nextBlockFast(_PREHASH_ObjectData); gMessageSystem->addU8Fast(_PREHASH_Material, material); diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_build_options.xml b/linden/indra/newview/skins/default/xui/en-us/floater_build_options.xml index 807caa0..6e6e65c 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_build_options.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_build_options.xml @@ -1,8 +1,8 @@ + can_resize="false" follows="right" height="165" min_height="165" + min_width="320" mouse_opaque="true" name="build options floater" + rect_control="FloaterBuildOptionsRect" title="Grid Options" width="320"> + -- cgit v1.1