aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llcommon/indra_constants.h
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:46 -0500
committerJacek Antonelli2008-08-15 23:44:46 -0500
commit38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4 (patch)
treeadca584755d22ca041a2dbfc35d4eca01f70b32c /linden/indra/llcommon/indra_constants.h
parentREADME.txt (diff)
downloadmeta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.zip
meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.gz
meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.bz2
meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.xz
Second Life viewer sources 1.13.2.12
Diffstat (limited to 'linden/indra/llcommon/indra_constants.h')
-rw-r--r--linden/indra/llcommon/indra_constants.h357
1 files changed, 357 insertions, 0 deletions
diff --git a/linden/indra/llcommon/indra_constants.h b/linden/indra/llcommon/indra_constants.h
new file mode 100644
index 0000000..31c2559
--- /dev/null
+++ b/linden/indra/llcommon/indra_constants.h
@@ -0,0 +1,357 @@
1/**
2 * @file indra_constants.h
3 * @brief some useful short term constants for Indra
4 *
5 * Copyright (c) 2001-2007, Linden Research, Inc.
6 *
7 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement
10 * ("Other License"), formally executed by you and Linden Lab. Terms of
11 * the GPL can be found in doc/GPL-license.txt in this distribution, or
12 * online at http://secondlife.com/developers/opensource/gplv2
13 *
14 * There are special exceptions to the terms and conditions of the GPL as
15 * it is applied to this Source Code. View the full text of the exception
16 * in the file doc/FLOSS-exception.txt in this software distribution, or
17 * online at http://secondlife.com/developers/opensource/flossexception
18 *
19 * By copying, modifying or distributing this software, you acknowledge
20 * that you have read and understood your obligations described above,
21 * and agree to abide by those obligations.
22 *
23 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
24 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
25 * COMPLETENESS OR PERFORMANCE.
26 */
27
28#ifndef LL_INDRA_CONSTANTS_H
29#define LL_INDRA_CONSTANTS_H
30
31#include "lluuid.h"
32
33// Viewer object cache version, change if object update
34// format changes. JC
35const U32 INDRA_OBJECT_CACHE_VERSION = 11;
36
37// At 45 Hz collisions seem stable and objects seem
38// to settle down at a reasonable rate.
39// JC 3/18/2003
40const F32 HAVOK_TIMESTEP = 1.f / 45.f;
41
42const F32 COLLISION_TOLERANCE = 0.1f;
43
44// Time constants
45const U32 HOURS_PER_LINDEN_DAY = 4;
46const U32 DAYS_PER_LINDEN_YEAR = 11;
47
48const U32 SEC_PER_LINDEN_DAY = HOURS_PER_LINDEN_DAY * 60 * 60;
49const U32 SEC_PER_LINDEN_YEAR = DAYS_PER_LINDEN_YEAR * SEC_PER_LINDEN_DAY;
50
51const F32 REGION_WIDTH_METERS = 256.f;
52const S32 REGION_WIDTH_UNITS = 256;
53const U32 REGION_WIDTH_U32 = 256;
54
55// Bits for simulator performance query flags
56enum LAND_STAT_FLAGS
57{
58 STAT_FILTER_BY_PARCEL = 0x00000001,
59 STAT_FILTER_BY_OWNER = 0x00000002,
60 STAT_FILTER_BY_OBJECT = 0x00000004,
61 STAT_REQUEST_LAST_ENTRY = 0x80000000,
62};
63
64enum LAND_STAT_REPORT_TYPE
65{
66 STAT_REPORT_TOP_SCRIPTS = 0,
67 STAT_REPORT_TOP_COLLIDERS
68};
69
70const U32 STAT_FILTER_MASK = 0x1FFFFFFF;
71
72// Default maximum number of tasks/prims per region.
73const U32 MAX_TASKS_PER_REGION = 15000;
74
75const F32 MIN_AGENT_DEPTH = 0.30f;
76const F32 DEFAULT_AGENT_DEPTH = 0.45f;
77const F32 MAX_AGENT_DEPTH = 0.60f;
78
79const F32 MIN_AGENT_WIDTH = 0.40f;
80const F32 DEFAULT_AGENT_WIDTH = 0.60f;
81const F32 MAX_AGENT_WIDTH = 0.80f;
82
83const F32 MIN_AGENT_HEIGHT = 1.3f - 2.0f * COLLISION_TOLERANCE;
84const F32 DEFAULT_AGENT_HEIGHT = 1.9f;
85const F32 MAX_AGENT_HEIGHT = 2.65f - 2.0f * COLLISION_TOLERANCE;
86
87// For linked sets
88const S32 MAX_CHILDREN_PER_TASK = 255;
89const S32 MAX_CHILDREN_PER_PHYSICAL_TASK = 31;
90
91const S32 MAX_JOINTS_PER_OBJECT = 1; // limiting to 1 until Havok 2.x
92
93const char* const DEFAULT_DMZ_SPACE_SERVER = "192.168.0.140";
94const char* const DEFAULT_DMZ_USER_SERVER = "192.168.0.140";
95const char* const DEFAULT_DMZ_DATA_SERVER = "192.168.0.140";
96const char* const DEFAULT_DMZ_ASSET_SERVER = "http://asset.dmz.lindenlab.com:80";
97
98const char* const DEFAULT_AGNI_SPACE_SERVER = "63.211.139.100";
99const char* const DEFAULT_AGNI_USER_SERVER = "63.211.139.100";
100const char* const DEFAULT_AGNI_DATA_SERVER = "63.211.139.100";
101const char* const DEFAULT_AGNI_ASSET_SERVER = "http://asset.agni.lindenlab.com:80";
102
103// Information about what ports are for what services is in the wiki Name Space Ports page
104const char* const DEFAULT_LOCAL_ASSET_SERVER = "http://localhost:12041/asset/tmp";
105const char* const LOCAL_ASSET_URL_FORMAT = "http://%s:12041/asset";
106
107const U32 DEFAULT_LAUNCHER_PORT = 12029;
108const U32 DEFAULT_BIGBOARD_PORT = 12030;
109const U32 DEFAULT_QUERYSIM_PORT = 12031;
110const U32 DEFAULT_DATA_SERVER_PORT = 12032;
111const U32 DEFAULT_SPACE_SERVER_PORT = 12033;
112const U32 DEFAULT_VIEWER_PORT = 12034;
113const U32 DEFAULT_SIMULATOR_PORT = 12035;
114const U32 DEFAULT_USER_SERVER_PORT = 12036;
115const U32 DEFAULT_RPC_SERVER_PORT = 12037;
116const U32 DEFAULT_LOG_DATA_SERVER_PORT = 12039;
117const U32 DEFAULT_BACKBONE_PORT = 12040;
118const U32 DEFAULT_LOCAL_ASSET_PORT = 12041;
119const U32 DEFAULT_BACKBONE_CAP_PORT = 12042;
120
121// For automatic port discovery when running multiple viewers on one host
122const U32 PORT_DISCOVERY_RANGE_MIN = 13000;
123const U32 PORT_DISCOVERY_RANGE_MAX = PORT_DISCOVERY_RANGE_MIN + 50;
124
125const char LAND_LAYER_CODE = 'L';
126const char WATER_LAYER_CODE = 'W';
127const char WIND_LAYER_CODE = '7';
128const char CLOUD_LAYER_CODE = '8';
129
130// keys
131// Bit masks for various keyboard modifier keys.
132const MASK MASK_NONE = 0x0000;
133const MASK MASK_CONTROL = 0x0001;
134const MASK MASK_ALT = 0x0002;
135const MASK MASK_SHIFT = 0x0004;
136
137// Special keys go into >128
138const KEY KEY_SPECIAL = 0x80; // special keys start here
139const KEY KEY_RETURN = 0x81;
140const KEY KEY_LEFT = 0x82;
141const KEY KEY_RIGHT = 0x83;
142const KEY KEY_UP = 0x84;
143const KEY KEY_DOWN = 0x85;
144const KEY KEY_ESCAPE = 0x86;
145const KEY KEY_BACKSPACE =0x87;
146const KEY KEY_DELETE = 0x88;
147const KEY KEY_SHIFT = 0x89;
148const KEY KEY_CONTROL = 0x8A;
149const KEY KEY_ALT = 0x8B;
150const KEY KEY_HOME = 0x8C;
151const KEY KEY_END = 0x8D;
152const KEY KEY_PAGE_UP = 0x8E;
153const KEY KEY_PAGE_DOWN = 0x8F;
154const KEY KEY_HYPHEN = 0x90;
155const KEY KEY_EQUALS = 0x91;
156const KEY KEY_INSERT = 0x92;
157const KEY KEY_CAPSLOCK = 0x93;
158const KEY KEY_TAB = 0x94;
159const KEY KEY_ADD = 0x95;
160const KEY KEY_SUBTRACT =0x96;
161const KEY KEY_MULTIPLY =0x97;
162const KEY KEY_DIVIDE = 0x98;
163const KEY KEY_F1 = 0xA1;
164const KEY KEY_F2 = 0xA2;
165const KEY KEY_F3 = 0xA3;
166const KEY KEY_F4 = 0xA4;
167const KEY KEY_F5 = 0xA5;
168const KEY KEY_F6 = 0xA6;
169const KEY KEY_F7 = 0xA7;
170const KEY KEY_F8 = 0xA8;
171const KEY KEY_F9 = 0xA9;
172const KEY KEY_F10 = 0xAA;
173const KEY KEY_F11 = 0xAB;
174const KEY KEY_F12 = 0xAC;
175
176const KEY KEY_PAD_UP = 0xC0;
177const KEY KEY_PAD_DOWN = 0xC1;
178const KEY KEY_PAD_LEFT = 0xC2;
179const KEY KEY_PAD_RIGHT = 0xC3;
180const KEY KEY_PAD_HOME = 0xC4;
181const KEY KEY_PAD_END = 0xC5;
182const KEY KEY_PAD_PGUP = 0xC6;
183const KEY KEY_PAD_PGDN = 0xC7;
184const KEY KEY_PAD_CENTER = 0xC8; // the 5 in the middle
185const KEY KEY_PAD_INS = 0xC9;
186const KEY KEY_PAD_DEL = 0xCA;
187const KEY KEY_PAD_RETURN = 0xCB;
188const KEY KEY_PAD_ADD = 0xCC; // not used
189const KEY KEY_PAD_SUBTRACT = 0xCD; // not used
190const KEY KEY_PAD_MULTIPLY = 0xCE; // not used
191const KEY KEY_PAD_DIVIDE = 0xCF; // not used
192
193const KEY KEY_BUTTON0 = 0xD0;
194const KEY KEY_BUTTON1 = 0xD1;
195const KEY KEY_BUTTON2 = 0xD2;
196const KEY KEY_BUTTON3 = 0xD3;
197const KEY KEY_BUTTON4 = 0xD4;
198const KEY KEY_BUTTON5 = 0xD5;
199const KEY KEY_BUTTON6 = 0xD6;
200const KEY KEY_BUTTON7 = 0xD7;
201const KEY KEY_BUTTON8 = 0xD8;
202const KEY KEY_BUTTON9 = 0xD9;
203const KEY KEY_BUTTON10 = 0xDA;
204const KEY KEY_BUTTON11 = 0xDB;
205const KEY KEY_BUTTON12 = 0xDC;
206const KEY KEY_BUTTON13 = 0xDD;
207const KEY KEY_BUTTON14 = 0xDE;
208const KEY KEY_BUTTON15 = 0xDF;
209
210const KEY KEY_NONE = 0xFF; // not sent from keyboard. For internal use only.
211
212const S32 KEY_COUNT = 256;
213
214
215const F32 DEFAULT_WATER_HEIGHT = 20.0f;
216
217// Maturity ratings for simulators
218const U8 SIM_ACCESS_MIN = 0;
219const U8 SIM_ACCESS_TRIAL = 7;
220const U8 SIM_ACCESS_PG = 13;
221const U8 SIM_ACCESS_MATURE = 21;
222const U8 SIM_ACCESS_DOWN = 254;
223const U8 SIM_ACCESS_MAX = SIM_ACCESS_MATURE;
224
225// group constants
226const S32 MAX_AGENT_GROUPS = 25;
227
228// god levels
229const U8 GOD_MAINTENANCE = 250;
230const U8 GOD_FULL = 200;
231const U8 GOD_LIAISON = 150;
232const U8 GOD_CUSTOMER_SERVICE = 100;
233const U8 GOD_LIKE = 1;
234const U8 GOD_NOT = 0;
235
236// "agent id" for things that should be done to ALL agents
237const LLUUID LL_UUID_ALL_AGENTS("44e87126-e794-4ded-05b3-7c42da3d5cdb");
238
239// Governor Linden's agent id.
240const LLUUID GOVERNOR_LINDEN_ID("3d6181b0-6a4b-97ef-18d8-722652995cf1");
241const LLUUID REALESTATE_LINDEN_ID("3d6181b0-6a4b-97ef-18d8-722652995cf1");
242// Maintenance's group id.
243const LLUUID MAINTENANCE_GROUP_ID("dc7b21cd-3c89-fcaa-31c8-25f9ffd224cd");
244
245// Flags for kick message
246const U32 KICK_FLAGS_DEFAULT = 0x0;
247const U32 KICK_FLAGS_FREEZE = 1 << 0;
248const U32 KICK_FLAGS_UNFREEZE = 1 << 1;
249
250const U8 UPD_NONE = 0x00;
251const U8 UPD_POSITION = 0x01;
252const U8 UPD_ROTATION = 0x02;
253const U8 UPD_SCALE = 0x04;
254const U8 UPD_LINKED_SETS = 0x08;
255const U8 UPD_UNIFORM = 0x10; // used with UPD_SCALE
256
257// Agent Update Flags (U8)
258const U8 AU_FLAGS_NONE = 0x00;
259const U8 AU_FLAGS_HIDETITLE = 0x01;
260
261// start location constants
262const U32 START_LOCATION_ID_LAST = 0;
263const U32 START_LOCATION_ID_HOME = 1;
264const U32 START_LOCATION_ID_DIRECT = 2; // for direct teleport
265const U32 START_LOCATION_ID_PARCEL = 3; // for teleports to a parcel
266const U32 START_LOCATION_ID_TELEHUB = 4; // for teleports to a spawnpoint
267const U32 START_LOCATION_ID_URL = 5;
268const U32 START_LOCATION_ID_COUNT = 6;
269
270// group constants
271const U32 GROUP_MIN_SIZE = 2;
272
273// radius within which a chat message is fully audible
274const F32 CHAT_WHISPER_RADIUS = 10.f;
275const F32 CHAT_NORMAL_RADIUS = 20.f;
276const F32 CHAT_SHOUT_RADIUS = 100.f;
277const F32 CHAT_MAX_RADIUS = CHAT_SHOUT_RADIUS;
278const F32 CHAT_MAX_RADIUS_BY_TWO = CHAT_MAX_RADIUS / 2.f;
279
280// this times above gives barely audible radius
281const F32 CHAT_BARELY_AUDIBLE_FACTOR = 2.0f;
282
283// distance in front of speaking agent the sphere is centered
284const F32 CHAT_WHISPER_OFFSET = 5.f;
285const F32 CHAT_NORMAL_OFFSET = 10.f;
286const F32 CHAT_SHOUT_OFFSET = 50.f;
287
288// first clean starts at 3 AM
289const S32 SANDBOX_FIRST_CLEAN_HOUR = 3;
290// clean every <n> hours
291const S32 SANDBOX_CLEAN_FREQ = 12;
292
293const F32 WIND_SCALE_HACK = 2.0f; // hack to make wind speeds more realistic
294
295enum ETerrainBrushType
296{
297 // the valid brush numbers cannot be reordered, because they
298 // are used in the binary LSL format as arguments to llModifyLand()
299 E_LANDBRUSH_LEVEL = 0,
300 E_LANDBRUSH_RAISE = 1,
301 E_LANDBRUSH_LOWER = 2,
302 E_LANDBRUSH_SMOOTH = 3,
303 E_LANDBRUSH_NOISE = 4,
304 E_LANDBRUSH_REVERT = 5,
305 E_LANDBRUSH_INVALID = 6
306};
307
308// media commands
309const U32 PARCEL_MEDIA_COMMAND_STOP = 0;
310const U32 PARCEL_MEDIA_COMMAND_PAUSE = 1;
311const U32 PARCEL_MEDIA_COMMAND_PLAY = 2;
312const U32 PARCEL_MEDIA_COMMAND_LOOP = 3;
313const U32 PARCEL_MEDIA_COMMAND_TEXTURE = 4;
314const U32 PARCEL_MEDIA_COMMAND_URL = 5;
315const U32 PARCEL_MEDIA_COMMAND_TIME = 6;
316const U32 PARCEL_MEDIA_COMMAND_AGENT = 7;
317const U32 PARCEL_MEDIA_COMMAND_UNLOAD = 8;
318const U32 PARCEL_MEDIA_COMMAND_AUTO_ALIGN = 9;
319
320// map item types
321const U32 MAP_ITEM_TELEHUB = 0x01;
322const U32 MAP_ITEM_PG_EVENT = 0x02;
323const U32 MAP_ITEM_MATURE_EVENT = 0x03;
324const U32 MAP_ITEM_POPULAR = 0x04;
325const U32 MAP_ITEM_AGENT_COUNT = 0x05;
326const U32 MAP_ITEM_AGENT_LOCATIONS = 0x06;
327const U32 MAP_ITEM_LAND_FOR_SALE = 0x07;
328const U32 MAP_ITEM_CLASSIFIED = 0x08;
329
330// Crash reporter behavior
331const char* const CRASH_SETTINGS_FILE = "crash_settings.xml";
332const char* const CRASH_BEHAVIOR_SETTING = "CrashBehavior";
333const S32 CRASH_BEHAVIOR_ASK = 0;
334const S32 CRASH_BEHAVIOR_ALWAYS_SEND = 1;
335const S32 CRASH_BEHAVIOR_NEVER_SEND = 2;
336
337// Export/Import return values
338const S32 EXPORT_SUCCESS = 0;
339const S32 EXPORT_ERROR_PERMISSIONS = -1;
340const S32 EXPORT_ERROR_UNKNOWN = -2;
341
342// This is how long the sim will try to teleport you before giving up.
343const F32 TELEPORT_EXPIRY = 15.0f;
344// Additional time (in seconds) to wait per attachment
345const F32 TELEPORT_EXPIRY_PER_ATTACHMENT = 3.f;
346
347// The maximum size of an object extra parameters binary (packed) block
348#define MAX_OBJECT_PARAMS_SIZE 1024
349
350const S32 CHAT_CHANNEL_DEBUG = S32_MAX;
351
352// PLEASE don't add constants here. Every dev will have to do
353// a complete rebuild. Try to find another shared header file,
354// like llregionflags.h, lllslconstants.h, llagentconstants.h,
355// or create a new one. JC
356
357#endif