PageRenderTime 26ms CodeModel.GetById 11ms app.highlight 12ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/llmessage/llregionflags.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 171 lines | 87 code | 36 blank | 48 comment | 3 complexity | 8b1442795cf50091fb7d5b2cc8c910da MD5 | raw file
  1/** 
  2 * @file llregionflags.h
  3 * @brief Flags that are sent in the statistics message region_flags field.
  4 *
  5 * $LicenseInfo:firstyear=2002&license=viewerlgpl$
  6 * Second Life Viewer Source Code
  7 * Copyright (C) 2010, Linden Research, Inc.
  8 * 
  9 * This library is free software; you can redistribute it and/or
 10 * modify it under the terms of the GNU Lesser General Public
 11 * License as published by the Free Software Foundation;
 12 * version 2.1 of the License only.
 13 * 
 14 * This library is distributed in the hope that it will be useful,
 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 17 * Lesser General Public License for more details.
 18 * 
 19 * You should have received a copy of the GNU Lesser General Public
 20 * License along with this library; if not, write to the Free Software
 21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 22 * 
 23 * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
 24 * $/LicenseInfo$
 25 */
 26
 27#ifndef LL_LLREGIONFLAGS_H
 28#define LL_LLREGIONFLAGS_H
 29
 30// Can you be hurt here? Should health be on?
 31const U32 REGION_FLAGS_ALLOW_DAMAGE				= (1 << 0);
 32
 33// Can you make landmarks here?
 34const U32 REGION_FLAGS_ALLOW_LANDMARK			= (1 << 1);
 35
 36// Do we reset the home position when someone teleports away from here?
 37const U32 REGION_FLAGS_ALLOW_SET_HOME			= (1 << 2);
 38
 39// Do we reset the home position when someone teleports away from here?
 40const U32 REGION_FLAGS_RESET_HOME_ON_TELEPORT	= (1 << 3);
 41
 42// Does the sun move?
 43const U32 REGION_FLAGS_SUN_FIXED				= (1 << 4);
 44
 45// Can't change the terrain heightfield, even on owned parcels,
 46// but can plant trees and grass.
 47const U32 REGION_FLAGS_BLOCK_TERRAFORM			= (1 << 6);
 48
 49// Can't release, sell, or buy land.
 50const U32 REGION_FLAGS_BLOCK_LAND_RESELL		= (1 << 7);
 51
 52// All content wiped once per night
 53const U32 REGION_FLAGS_SANDBOX					= (1 << 8);
 54const U32 REGION_FLAGS_SKIP_COLLISIONS			= (1 << 12); // Pin all non agent rigid bodies
 55const U32 REGION_FLAGS_SKIP_SCRIPTS				= (1 << 13);
 56const U32 REGION_FLAGS_SKIP_PHYSICS				= (1 << 14); // Skip all physics
 57const U32 REGION_FLAGS_EXTERNALLY_VISIBLE		= (1 << 15);
 58const U32 REGION_FLAGS_ALLOW_RETURN_ENCROACHING_OBJECT = (1 << 16);
 59const U32 REGION_FLAGS_ALLOW_RETURN_ENCROACHING_ESTATE_OBJECT = (1 << 17);
 60const U32 REGION_FLAGS_BLOCK_DWELL				= (1 << 18);
 61
 62// Is flight allowed?
 63const U32 REGION_FLAGS_BLOCK_FLY				= (1 << 19);	
 64
 65// Is direct teleport (p2p) allowed?
 66const U32 REGION_FLAGS_ALLOW_DIRECT_TELEPORT	= (1 << 20);
 67
 68// Is there an administrative override on scripts in the region at the
 69// moment. This is the similar skip scripts, except this flag is
 70// presisted in the database on an estate level.
 71const U32 REGION_FLAGS_ESTATE_SKIP_SCRIPTS		= (1 << 21);
 72
 73const U32 REGION_FLAGS_RESTRICT_PUSHOBJECT		= (1 << 22);
 74
 75const U32 REGION_FLAGS_DENY_ANONYMOUS			= (1 << 23);
 76
 77const U32 REGION_FLAGS_ALLOW_PARCEL_CHANGES		= (1 << 26);
 78
 79const U32 REGION_FLAGS_ALLOW_VOICE = (1 << 28);
 80
 81const U32 REGION_FLAGS_BLOCK_PARCEL_SEARCH = (1 << 29);
 82const U32 REGION_FLAGS_DENY_AGEUNVERIFIED	= (1 << 30);
 83
 84const U32 REGION_FLAGS_DEFAULT = REGION_FLAGS_ALLOW_LANDMARK |
 85								 REGION_FLAGS_ALLOW_SET_HOME |
 86                                 REGION_FLAGS_ALLOW_PARCEL_CHANGES |
 87                                 REGION_FLAGS_ALLOW_VOICE;
 88
 89
 90const U32 REGION_FLAGS_PRELUDE_SET = REGION_FLAGS_RESET_HOME_ON_TELEPORT;
 91const U32 REGION_FLAGS_PRELUDE_UNSET = REGION_FLAGS_ALLOW_LANDMARK 
 92									   | REGION_FLAGS_ALLOW_SET_HOME;
 93
 94const U32 REGION_FLAGS_ESTATE_MASK = REGION_FLAGS_EXTERNALLY_VISIBLE
 95									 | REGION_FLAGS_SUN_FIXED
 96									 | REGION_FLAGS_DENY_ANONYMOUS
 97									 | REGION_FLAGS_DENY_AGEUNVERIFIED;
 98
 99inline BOOL is_prelude( U32 flags )
100{
101	// definition of prelude does not depend on fixed-sun
102	return 0 == (flags & REGION_FLAGS_PRELUDE_UNSET)
103		   && 0 != (flags & REGION_FLAGS_PRELUDE_SET);
104}
105
106inline U32 set_prelude_flags(U32 flags)
107{
108	// also set the sun-fixed flag
109	return ((flags & ~REGION_FLAGS_PRELUDE_UNSET)
110			| (REGION_FLAGS_PRELUDE_SET | REGION_FLAGS_SUN_FIXED));
111}
112
113inline U32 unset_prelude_flags(U32 flags)
114{
115	// also unset the fixed-sun flag
116	return ((flags | REGION_FLAGS_PRELUDE_UNSET) 
117			& ~(REGION_FLAGS_PRELUDE_SET | REGION_FLAGS_SUN_FIXED));
118}
119
120// estate constants. Need to match first few etries in indra.estate table.
121const U32 ESTATE_ALL = 0; // will not match in db, reserved key for logic
122const U32 ESTATE_MAINLAND = 1;
123const U32 ESTATE_ORIENTATION = 2;
124const U32 ESTATE_INTERNAL = 3;
125const U32 ESTATE_SHOWCASE = 4;
126const U32 ESTATE_TEEN = 5;
127const U32 ESTATE_LAST_LINDEN = 5; // last linden owned/managed estate
128
129// for EstateOwnerRequest, setaccess message
130const U32 ESTATE_ACCESS_ALLOWED_AGENTS	= 1 << 0;
131const U32 ESTATE_ACCESS_ALLOWED_GROUPS	= 1 << 1;
132const U32 ESTATE_ACCESS_BANNED_AGENTS	= 1 << 2;
133const U32 ESTATE_ACCESS_MANAGERS		= 1 << 3;
134
135//maximum number of access list entries we can fit in one packet
136const S32 ESTATE_ACCESS_MAX_ENTRIES_PER_PACKET = 63;
137
138// for reply to "getinfo", don't need to forward to all sims in estate
139const U32 ESTATE_ACCESS_SEND_TO_AGENT_ONLY = 1 << 4;
140
141const U32 ESTATE_ACCESS_ALL = ESTATE_ACCESS_ALLOWED_AGENTS
142							  | ESTATE_ACCESS_ALLOWED_GROUPS
143							  | ESTATE_ACCESS_BANNED_AGENTS
144							  | ESTATE_ACCESS_MANAGERS;
145
146// for EstateOwnerRequest, estateaccessdelta message
147const U32 ESTATE_ACCESS_APPLY_TO_ALL_ESTATES		= 1 << 0;
148const U32 ESTATE_ACCESS_APPLY_TO_MANAGED_ESTATES	= 1 << 1;
149
150const U32 ESTATE_ACCESS_ALLOWED_AGENT_ADD			= 1 << 2;
151const U32 ESTATE_ACCESS_ALLOWED_AGENT_REMOVE		= 1 << 3;
152const U32 ESTATE_ACCESS_ALLOWED_GROUP_ADD			= 1 << 4;
153const U32 ESTATE_ACCESS_ALLOWED_GROUP_REMOVE		= 1 << 5;
154const U32 ESTATE_ACCESS_BANNED_AGENT_ADD			= 1 << 6;
155const U32 ESTATE_ACCESS_BANNED_AGENT_REMOVE			= 1 << 7;
156const U32 ESTATE_ACCESS_MANAGER_ADD					= 1 << 8;
157const U32 ESTATE_ACCESS_MANAGER_REMOVE				= 1 << 9;
158const U32 ESTATE_ACCESS_NO_REPLY                                  = 1 << 10;
159
160const S32 ESTATE_MAX_MANAGERS = 10;
161const S32 ESTATE_MAX_ACCESS_IDS = 500;	// max for access, banned
162const S32 ESTATE_MAX_GROUP_IDS = (S32) ESTATE_ACCESS_MAX_ENTRIES_PER_PACKET;
163
164// 'Sim Wide Delete' flags
165const U32 SWD_OTHERS_LAND_ONLY		= (1 << 0);
166const U32 SWD_ALWAYS_RETURN_OBJECTS = (1 << 1);
167const U32 SWD_SCRIPTED_ONLY			= (1 << 2);
168
169#endif
170
171