aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/lltoolplacer.cpp
diff options
context:
space:
mode:
authorelektrahesse2010-10-03 10:06:37 +0200
committerelektrahesse2010-10-03 10:06:37 +0200
commit00abcf5bb6e945632a5450663d7e55e1c63a466a (patch)
treecc78ba902f3f95192855eaa4eacb63879a3becb0 /linden/indra/newview/lltoolplacer.cpp
parentChanged version to Experimental 2010.10.02 (diff)
downloadmeta-impy-00abcf5bb6e945632a5450663d7e55e1c63a466a.zip
meta-impy-00abcf5bb6e945632a5450663d7e55e1c63a466a.tar.gz
meta-impy-00abcf5bb6e945632a5450663d7e55e1c63a466a.tar.bz2
meta-impy-00abcf5bb6e945632a5450663d7e55e1c63a466a.tar.xz
Patch to enable building on any parcel if the agent has create powers in the land group. If the land is deeded the object is created with the agent active group, else it's set to the land group by default. Also enables the build button when it should.
Diffstat (limited to 'linden/indra/newview/lltoolplacer.cpp')
-rw-r--r--linden/indra/newview/lltoolplacer.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/linden/indra/newview/lltoolplacer.cpp b/linden/indra/newview/lltoolplacer.cpp
index d5c4de1..00b0c9f 100644
--- a/linden/indra/newview/lltoolplacer.cpp
+++ b/linden/indra/newview/lltoolplacer.cpp
@@ -67,6 +67,7 @@
67 67
68#include "llparcel.h" // RezWithLandGroup 68#include "llparcel.h" // RezWithLandGroup
69#include "llviewerparcelmgr.h" // RezWithLandGroup 69#include "llviewerparcelmgr.h" // RezWithLandGroup
70#include "roles_constants.h" // Ele: Land Group Override
70 71
71const LLVector3 DEFAULT_OBJECT_SCALE(0.5f, 0.5f, 0.5f); 72const LLVector3 DEFAULT_OBJECT_SCALE(0.5f, 0.5f, 0.5f);
72 73
@@ -264,9 +265,11 @@ BOOL LLToolPlacer::addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics )
264 gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); 265 gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
265 // RezWithLandGroup 2009-05, If avatar is in land group/land owner group, 266 // RezWithLandGroup 2009-05, If avatar is in land group/land owner group,
266 // it rezzes it with it to prevent autoreturn/whatever 267 // it rezzes it with it to prevent autoreturn/whatever
267 if ( gSavedSettings.getBOOL("RezWithLandGroup") ) 268
269 // Ele: if agent is in land group and has create powers but the tag is not active, force it to enable build seamlessly
270 LLParcel *parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
271 if ( gSavedSettings.getBOOL("RezWithLandGroup"))
268 { 272 {
269 LLParcel *parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
270 if ( gAgent.isInGroup(parcel->getGroupID()) ) 273 if ( gAgent.isInGroup(parcel->getGroupID()) )
271 { 274 {
272 gMessageSystem->addUUIDFast(_PREHASH_GroupID, parcel->getGroupID()); 275 gMessageSystem->addUUIDFast(_PREHASH_GroupID, parcel->getGroupID());
@@ -280,7 +283,11 @@ BOOL LLToolPlacer::addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics )
280 gMessageSystem->addUUIDFast(_PREHASH_GroupID, gAgent.getGroupID()); 283 gMessageSystem->addUUIDFast(_PREHASH_GroupID, gAgent.getGroupID());
281 } 284 }
282 } 285 }
283 else 286 else if (gAgent.hasPowerInGroup(parcel->getGroupID(), GP_LAND_ALLOW_CREATE) && !parcel->getIsGroupOwned())
287 {
288 gMessageSystem->addUUIDFast(_PREHASH_GroupID, parcel->getGroupID());
289 }
290 else
284 { 291 {
285 gMessageSystem->addUUIDFast(_PREHASH_GroupID, gAgent.getGroupID()); 292 gMessageSystem->addUUIDFast(_PREHASH_GroupID, gAgent.getGroupID());
286 } 293 }