summaryrefslogtreecommitdiff
path: root/indra/newview/llagent.cpp
diff options
context:
space:
mode:
authorJosh Bell <josh@lindenlab.com>2007-11-01 22:02:35 +0000
committerJosh Bell <josh@lindenlab.com>2007-11-01 22:02:35 +0000
commit7afa8058aae0d5363cc19c7df1e6d2d7ec3bf7ac (patch)
tree52f41bda3e57a58e968421212a8a48eead6f653d /indra/newview/llagent.cpp
parent833e8d5c2a1dd48fd89b8b438dbe56572697bb76 (diff)
svn merge -r 72652:72881 svn+ssh://svn.lindenlab.com/svn/linden/branches/sl-search-11 --> release
QAR-11: pair-reviewed the merge w/ Sam.
Diffstat (limited to 'indra/newview/llagent.cpp')
-rw-r--r--indra/newview/llagent.cpp29
1 files changed, 23 insertions, 6 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index d825704bfc..fb411315ae 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -903,6 +903,7 @@ BOOL LLAgent::canManageEstate() const
{
return mRegionp && mRegionp->canManageEstate();
}
+
//-----------------------------------------------------------------------------
// sendMessage()
//-----------------------------------------------------------------------------
@@ -4709,6 +4710,22 @@ U8 LLAgent::getGodLevel() const
#endif
}
+bool LLAgent::isTeen() const
+{
+ return mAccess < SIM_ACCESS_MATURE;
+}
+
+void LLAgent::setTeen(bool teen)
+{
+ if (teen)
+ {
+ mAccess = SIM_ACCESS_PG;
+ }
+ else
+ {
+ mAccess = SIM_ACCESS_MATURE;
+ }
+}
void LLAgent::buildFullname(std::string& name) const
{
@@ -5628,7 +5645,7 @@ void LLAgent::teleportRequest(
}
// Landmark ID = LLUUID::null means teleport home
-void LLAgent::teleportViaLandmark(const LLUUID& landmark_id)
+void LLAgent::teleportViaLandmark(const LLUUID& landmark_asset_id)
{
LLViewerRegion *regionp = getRegion();
if(regionp && teleportCore())
@@ -5638,7 +5655,7 @@ void LLAgent::teleportViaLandmark(const LLUUID& landmark_id)
msg->nextBlockFast(_PREHASH_Info);
msg->addUUIDFast(_PREHASH_AgentID, getID());
msg->addUUIDFast(_PREHASH_SessionID, getSessionID());
- msg->addUUIDFast(_PREHASH_LandmarkID, landmark_id);
+ msg->addUUIDFast(_PREHASH_LandmarkID, landmark_asset_id);
sendReliableMessage();
}
}
@@ -6851,7 +6868,7 @@ void LLAgent::removeWearable( EWearableType type )
{
LLWearable* old_wearable = mWearableEntry[ type ].mWearable;
- if ( (gAgent.mAccess < SIM_ACCESS_MATURE)
+ if ( (gAgent.isTeen())
&& (type == WT_UNDERSHIRT || type == WT_UNDERPANTS))
{
// Can't take off underclothing in simple UI mode or on PG accounts
@@ -6986,8 +7003,8 @@ void LLAgent::setWearableOutfit(
wearables_to_remove[WT_SOCKS] = remove;
wearables_to_remove[WT_JACKET] = remove;
wearables_to_remove[WT_GLOVES] = remove;
- wearables_to_remove[WT_UNDERSHIRT] = (gAgent.mAccess >= SIM_ACCESS_MATURE) & remove;
- wearables_to_remove[WT_UNDERPANTS] = (gAgent.mAccess >= SIM_ACCESS_MATURE) & remove;
+ wearables_to_remove[WT_UNDERSHIRT] = (!gAgent.isTeen()) & remove;
+ wearables_to_remove[WT_UNDERPANTS] = (!gAgent.isTeen()) & remove;
wearables_to_remove[WT_SKIRT] = remove;
S32 count = wearables.count();
@@ -7225,7 +7242,7 @@ void LLAgent::userRemoveWearable( void* userdata )
EWearableType type = (EWearableType)(intptr_t)userdata;
if( !(type==WT_SHAPE || type==WT_SKIN || type==WT_HAIR ) ) //&&
- //!((gAgent.mAccess >= SIM_ACCESS_MATURE) && ( type==WT_UNDERPANTS || type==WT_UNDERSHIRT )) )
+ //!((!gAgent.isTeen()) && ( type==WT_UNDERPANTS || type==WT_UNDERSHIRT )) )
{
gAgent.removeWearable( type );
}