LLViewerRegion WIP: Sync indra/llmessage/llregionflags.h with V3

It seems a few flags disappeared; adjusted the code accordingly.
Should do the same as V3 now.
This commit is contained in:
Aleric Inglewood
2012-02-18 02:15:31 +01:00
parent f381b0c2dd
commit 787e03e821
3 changed files with 23 additions and 69 deletions

View File

@@ -2,31 +2,25 @@
* @file llregionflags.h
* @brief Flags that are sent in the statistics message region_flags field.
*
* $LicenseInfo:firstyear=2002&license=viewergpl$
*
* Copyright (c) 2002-2009, Linden Research, Inc.
*
* $LicenseInfo:firstyear=2002&license=viewerlgpl$
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
* to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
* Copyright (C) 2010, Linden Research, Inc.
*
* There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or
* online at
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above,
* and agree to abide by those obligations.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
@@ -48,9 +42,6 @@ const U32 REGION_FLAGS_RESET_HOME_ON_TELEPORT = (1 << 3);
// Does the sun move?
const U32 REGION_FLAGS_SUN_FIXED = (1 << 4);
// Tax free zone (no taxes on objects, land, etc.)
const U32 REGION_FLAGS_TAX_FREE = (1 << 5);
// Can't change the terrain heightfield, even on owned parcels,
// but can plant trees and grass.
const U32 REGION_FLAGS_BLOCK_TERRAFORM = (1 << 6);
@@ -60,17 +51,12 @@ const U32 REGION_FLAGS_BLOCK_LAND_RESELL = (1 << 7);
// All content wiped once per night
const U32 REGION_FLAGS_SANDBOX = (1 << 8);
const U32 REGION_FLAGS_NULL_LAYER = (1 << 9);
// const U32 REGION_FLAGS_SKIP_AGENT_ACTION = (1 << 10);
const U32 REGION_FLAGS_HARD_ALLOW_LAND_TRANSFER = (1 << 10); // Region allows land reselling
// const U32 REGION_FLAGS_SKIP_UPDATE_INTEREST_LIST= (1 << 11);
const U32 REGION_FLAGS_HARD_ALLOW_POST_CLASSIFIED = (1 << 11); // Region allows posting of classified ads
const U32 REGION_FLAGS_SKIP_COLLISIONS = (1 << 12); // Pin all non agent rigid bodies
const U32 REGION_FLAGS_SKIP_SCRIPTS = (1 << 13);
const U32 REGION_FLAGS_SKIP_PHYSICS = (1 << 14); // Skip all physics
const U32 REGION_FLAGS_EXTERNALLY_VISIBLE = (1 << 15);
//const U32 REGION_FLAGS_MAINLAND_VISIBLE = (1 << 16);
const U32 REGION_FLAGS_PUBLIC_ALLOWED = (1 << 17);
const U32 REGION_FLAGS_ALLOW_RETURN_ENCROACHING_OBJECT = (1 << 16);
const U32 REGION_FLAGS_ALLOW_RETURN_ENCROACHING_ESTATE_OBJECT = (1 << 17);
const U32 REGION_FLAGS_BLOCK_DWELL = (1 << 18);
// Is flight allowed?
@@ -87,18 +73,13 @@ const U32 REGION_FLAGS_ESTATE_SKIP_SCRIPTS = (1 << 21);
const U32 REGION_FLAGS_RESTRICT_PUSHOBJECT = (1 << 22);
const U32 REGION_FLAGS_DENY_ANONYMOUS = (1 << 23);
// const U32 REGION_FLAGS_DENY_IDENTIFIED = (1 << 24);
// const U32 REGION_FLAGS_DENY_TRANSACTED = (1 << 25);
const U32 REGION_FLAGS_ALLOW_PARCEL_CHANGES = (1 << 26);
const U32 REGION_FLAGS_ABUSE_EMAIL_TO_ESTATE_OWNER = (1 << 27);
const U32 REGION_FLAGS_ALLOW_VOICE = (1 << 28);
const U32 REGION_FLAGS_BLOCK_PARCEL_SEARCH = (1 << 29);
const U32 REGION_FLAGS_DENY_AGEUNVERIFIED = (1 << 30);
const U32 REGION_FLAGS_SKIP_MONO_SCRIPTS = (1 << 31);
const U32 REGION_FLAGS_DEFAULT = REGION_FLAGS_ALLOW_LANDMARK |
REGION_FLAGS_ALLOW_SET_HOME |
@@ -111,7 +92,6 @@ const U32 REGION_FLAGS_PRELUDE_UNSET = REGION_FLAGS_ALLOW_LANDMARK
| REGION_FLAGS_ALLOW_SET_HOME;
const U32 REGION_FLAGS_ESTATE_MASK = REGION_FLAGS_EXTERNALLY_VISIBLE
| REGION_FLAGS_PUBLIC_ALLOWED
| REGION_FLAGS_SUN_FIXED
| REGION_FLAGS_DENY_ANONYMOUS
| REGION_FLAGS_DENY_AGEUNVERIFIED;

View File

@@ -107,7 +107,6 @@ LLMap< EReportType, LLFloaterReporter* > gReporterInstances;
// keeps track of where email is going to - global to avoid a pile
// of static/non-static access outside my control
namespace {
static BOOL gEmailToEstateOwner = FALSE;
static BOOL gDialogVisible = FALSE;
}
@@ -227,16 +226,10 @@ void LLFloaterReporter::processRegionInfo(LLMessageSystem* msg)
{
U32 region_flags;
msg->getU32("RegionInfo", "RegionFlags", region_flags);
gEmailToEstateOwner = ( region_flags & REGION_FLAGS_ABUSE_EMAIL_TO_ESTATE_OWNER );
if ( gDialogVisible )
{
if ( gEmailToEstateOwner )
{
LLNotificationsUtil::add("HelpReportAbuseEmailEO");
}
else
LLNotificationsUtil::add("HelpReportAbuseEmailLL");
LLNotificationsUtil::add("HelpReportAbuseEmailLL");
};
}
@@ -264,18 +257,7 @@ LLFloaterReporter::~LLFloaterReporter()
// virtual
void LLFloaterReporter::draw()
{
// this is set by a static callback sometime after the dialog is created.
// Only disable screenshot for abuse reports to estate owners - bug reports always
// allow screenshots to be taken.
if ( gEmailToEstateOwner && ( mReportType != BUG_REPORT ) )
{
childSetValue("screen_check", FALSE );
childSetEnabled("screen_check", FALSE );
}
else
{
childSetEnabled("screen_check", TRUE );
}
childSetEnabled("screen_check", TRUE );
LLFloater::draw();
}
@@ -805,17 +787,7 @@ LLSD LLFloaterReporter::gatherReport()
LLUUID screenshot_id = LLUUID::null;
if (childGetValue("screen_check"))
{
if ( mReportType != BUG_REPORT )
{
if ( gEmailToEstateOwner == FALSE )
{
screenshot_id = childGetValue("screenshot");
}
}
else
{
screenshot_id = childGetValue("screenshot");
};
screenshot_id = childGetValue("screenshot");
};
LLSD report = LLSD::emptyMap();

View File

@@ -773,10 +773,12 @@ void LLWorldMapView::drawTiles(S32 width, S32 height) {
// 1. Tiles are zoomed out small enough, or
// 2. Sim's texture has not been loaded yet
F32 map_scale_cutoff = SIM_MAP_SCALE;
#if 0 // This is always false, as REGION_FLAGS_NULL_LAYER doesn't exist anymore
if ((info->getRegionFlags() & REGION_FLAGS_NULL_LAYER) > 0)
{
map_scale_cutoff = SIM_NULL_MAP_SCALE;
}
#endif
bool sim_visible =
(sMapScale >= map_scale_cutoff) &&
@@ -910,7 +912,7 @@ void LLWorldMapView::drawTiles(S32 width, S32 height) {
gGL.end();
}
if ((info->getRegionFlags() & REGION_FLAGS_NULL_LAYER) == 0)
if (true /*V3: REGION_FLAGS_NULL_LAYER doesn't exist... (info->getRegionFlags() & REGION_FLAGS_NULL_LAYER) == 0*/)
{
// draw an alpha of 1 where the sims are visible (except NULL sims)
gGL.flush();