aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--linden/indra/newview/lltoolplacer.cpp13
-rw-r--r--linden/indra/newview/llviewerparcelmgr.cpp22
2 files changed, 24 insertions, 11 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 }
diff --git a/linden/indra/newview/llviewerparcelmgr.cpp b/linden/indra/newview/llviewerparcelmgr.cpp
index 61b91fe..257ce0d 100644
--- a/linden/indra/newview/llviewerparcelmgr.cpp
+++ b/linden/indra/newview/llviewerparcelmgr.cpp
@@ -651,15 +651,21 @@ BOOL LLViewerParcelMgr::agentCanBuild() const
651{ 651{
652 if (mAgentParcel) 652 if (mAgentParcel)
653 { 653 {
654 return (gAgent.isGodlike() 654 const LLUUID parcel_group = mAgentParcel->getGroupID();
655 || (mAgentParcel->allowModifyBy( 655 const LLUUID active_group = gAgent.getGroupID();
656 gAgent.getID(), 656
657 gAgent.getGroupID()))); 657 if (gAgent.isGodlike())
658 } 658 return true;
659 else 659
660 { 660 if (mAgentParcel->allowModifyBy(gAgent.getID(), active_group))
661 return gAgent.isGodlike(); 661 return true;
662
663 // Ele: enable build option if we are in the land group and we have create powers, even if the group tag is not active
664 if (gAgent.isInGroup(parcel_group) && gAgent.hasPowerInGroup(parcel_group, GP_LAND_ALLOW_CREATE))
665 return true;
662 } 666 }
667
668 return gAgent.isGodlike();
663} 669}
664 670
665BOOL LLViewerParcelMgr::agentCanTakeDamage() const 671BOOL LLViewerParcelMgr::agentCanTakeDamage() const