]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/constants.qh
Merge remote-tracking branch 'origin/master' into samual/notification_rewrite
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / constants.qh
1 // COMMIT-TODO: Update if necessary before committing
2 // Revision 1: additional statistics sent (flag caps, returns, deaths)
3 // Revision 2: Mapvote preview pictures
4 // Revision 3: optimized map vote protocol
5 // Revision 4: CSQC config var system
6 // Revision 5: mapvote time fix
7 // Revision 6: more robust against packet loss/delays, also show not yet connected clients
8 // Revision 7: packet loss column
9 // Revision 8: race
10 // Revision 9: race delta
11 // Revision 10: scoreboard force
12 // Revision 11: scoreboard unforce; spectator support beginning
13 // Revision 12: smaller scores updates (SERVER: requires new engine)
14 // Revision 13: pointparticles
15 // Revision 14: laser
16 // Revision 15: zoom
17 // Revision 16: multi-weapons
18 // Revision 17: multi-weaponimpulses
19 // Revision 18: warmup
20 // Revision 19: fog
21 // Revision 20: naggers
22 // Revision 21: entcs for players optimized (position data down from 12 to 7 bytes); waypointsprites in csqc for team radar
23 // Revision 22: hook shot origin
24 #define CSQC_REVISION 22
25
26 const float AS_STRING           = 1;
27 const float AS_INT              = 2;
28 const float AS_FLOAT_TRUNCATED  = 2;
29 const float AS_FLOAT            = 8;
30
31 const float TE_CSQC_PICTURE = 100;
32 const float TE_CSQC_RACE = 101;
33 const float TE_CSQC_SPAWN = 102;
34 const float TE_CSQC_ZCURVEPARTICLES = 103;
35 const float TE_CSQC_NEXGUNBEAMPARTICLE = 104;
36 const float TE_CSQC_LIGHTNINGARC = 105;
37 const float TE_CSQC_TEAMNAGGER = 106;
38 const float TE_CSQC_PINGPLREPORT = 107;
39 const float TE_CSQC_ANNOUNCE = 110;
40 const float TE_CSQC_TARGET_MUSIC = 111;
41 const float TE_CSQC_KILLNOTIFY = 112;
42 const float TE_CSQC_KILLCENTERPRINT = 113;
43 const float TE_CSQC_CENTERPRINT_GENERIC = 114;
44 const float TE_CSQC_WEAPONCOMPLAIN = 115;
45 const float TE_CSQC_NEX_SCOPE = 116;
46 const float TE_CSQC_MINELAYER_MAXMINES = 117;
47 const float TE_CSQC_HAGAR_MAXROCKETS = 118;
48 const float TE_CSQC_VEHICLESETUP = 119;
49 const float TE_CSQC_SVNOTICE = 120;
50 const float TE_CSQC_NOTIFICATION = 121;
51
52 const float RACE_NET_CHECKPOINT_HIT_QUALIFYING = 0; // byte checkpoint, short time, short recordtime, string recordholder
53 const float RACE_NET_CHECKPOINT_CLEAR = 1;
54 const float RACE_NET_CHECKPOINT_NEXT_QUALIFYING = 2; // byte nextcheckpoint, short recordtime, string recordholder
55 const float RACE_NET_CHECKPOINT_HIT_RACE = 3; // byte checkpoint, short delta, byte lapsdelta, string opponent
56 const float RACE_NET_CHECKPOINT_HIT_RACE_BY_OPPONENT = 4; // byte checkpoint, short delta, byte lapsdelta, string opponent
57 const float RACE_NET_CHECKPOINT_NEXT_SPEC_QUALIFYING = 5; // byte nextcheckpoint, float laptime, short recordtime, string recordholder
58 const float RACE_NET_PENALTY_RACE = 6; // byte penaltytime, string reason
59 const float RACE_NET_PENALTY_QUALIFYING = 7; // byte penaltytime, string reason
60 const float RACE_NET_SERVER_RECORD = 8; // server record, sent to client
61 const float RACE_NET_SPEED_AWARD = 9; // speed award, sent to client
62 const float RACE_NET_SPEED_AWARD_BEST = 10; // all time best speed award, sent to client
63 const float RACE_NET_SERVER_RANKINGS = 11;
64 const float RACE_NET_SERVER_STATUS = 12;
65 const float RANKINGS_CNT = 15;
66
67 const float ENT_CLIENT = 0;
68 const float ENT_CLIENT_DEAD = 1;
69 const float ENT_CLIENT_ENTCS = 2;
70 const float ENT_CLIENT_SCORES_INFO = 3;
71 const float ENT_CLIENT_SCORES = 4;
72 const float ENT_CLIENT_TEAMSCORES = 5;
73 const float ENT_CLIENT_POINTPARTICLES = 6;
74 const float ENT_CLIENT_RAINSNOW = 7;
75 const float ENT_CLIENT_LASER = 8;
76 const float ENT_CLIENT_NAGGER = 9; // flags [votecalledvote]
77 const float ENT_CLIENT_WAYPOINT = 10; // flags origin [team displayrule] [spritename] [spritename2] [spritename3] [lifetime maxdistance hideable]
78 const float ENT_CLIENT_RADARLINK = 11; // flags [startorigin] [endorigin] [startcolor+16*endcolor]
79 const float ENT_CLIENT_PROJECTILE = 12;
80 const float ENT_CLIENT_GIBSPLASH = 13;
81 const float ENT_CLIENT_DAMAGEINFO = 14;
82 const float ENT_CLIENT_CASING = 15;
83 const float ENT_CLIENT_INIT = 16;
84 const float ENT_CLIENT_MAPVOTE = 17;
85 const float ENT_CLIENT_CLIENTDATA = 18;
86 const float ENT_CLIENT_RANDOMSEED = 19;
87 const float ENT_CLIENT_WALL = 20;
88 const float ENT_CLIENT_SPIDERBOT = 21;
89 const float ENT_CLIENT_MODELEFFECT = 22;
90 const float ENT_CLIENT_TUBANOTE = 23;
91 const float ENT_CLIENT_WARPZONE = 24;
92 const float ENT_CLIENT_WARPZONE_CAMERA = 25;
93 const float ENT_CLIENT_TRIGGER_MUSIC = 26;
94 const float ENT_CLIENT_HOOK = 27;
95 const float ENT_CLIENT_LGBEAM = 28;
96 const float ENT_CLIENT_GAUNTLET = 29;
97 const float ENT_CLIENT_ACCURACY = 30;
98 const float ENT_CLIENT_SHOWNAMES = 31;
99 const float ENT_CLIENT_WARPZONE_TELEPORTED = 32;
100 const float ENT_CLIENT_MODEL = 33;
101 const float ENT_CLIENT_ITEM = 34;
102 const float ENT_CLIENT_BUMBLE_RAYGUN = 35;
103
104 const float ENT_CLIENT_TURRET = 40;
105 const float ENT_CLIENT_AUXILIARYXHAIR = 50;
106 const float ENT_CLIENT_VEHICLE = 60;
107
108 const float SPRITERULE_DEFAULT = 0;
109 const float SPRITERULE_TEAMPLAY = 1;
110
111 const float RADARICON_NONE = 0;
112 const float RADARICON_FLAG = 1;
113 const float RADARICON_FLAGCARRIER = 1;
114 const float RADARICON_HERE = 1; // TODO make these 3 and 4, and make images for them
115 const float RADARICON_DANGER = 1;
116 const float RADARICON_WAYPOINT = 1;
117 const float RADARICON_HELPME = 1;
118 const float RADARICON_CONTROLPOINT = 1;
119 const float RADARICON_GENERATOR = 1;
120 const float RADARICON_OBJECTIVE = 1;
121 const float RADARICON_DOMPOINT = 1;
122 const float RADARICON_POWERUP = 1;
123 const float RADARICON_TAGGED = 1;
124
125 ///////////////////////////
126 // keys pressed
127 const float KEY_FORWARD         =       1;
128 const float KEY_BACKWARD        =       2;
129 const float KEY_LEFT            =       4;
130 const float KEY_RIGHT           =       8;
131 const float KEY_JUMP            =       16;
132 const float KEY_CROUCH          =       32;
133 const float KEY_ATCK            =       64;
134 const float KEY_ATCK2           =       128;
135
136 ///////////////////////////
137 // cvar constants
138
139 float CVAR_SAVE         = 1;
140 float CVAR_NOTIFY       = 2;
141 float CVAR_READONLY     = 4;
142
143 ///////////////////////////
144 // csqc communication stuff
145
146 const float STAT_KH_KEYS = 32;
147 const float STAT_CTF_STATE = 33;
148 const float STAT_WEAPONS = 35;
149 const float STAT_SWITCHWEAPON = 36;
150 const float STAT_GAMESTARTTIME = 37;
151 const float STAT_STRENGTH_FINISHED = 38;
152 const float STAT_INVINCIBLE_FINISHED = 39;
153 const float STAT_PRESSED_KEYS = 42;
154 const float STAT_ALLOW_OLDNEXBEAM = 43; // this stat could later contain some other bits of info, like, more server-side particle config
155 const float STAT_FUEL = 44;
156 const float STAT_NB_METERSTART = 45;
157 const float STAT_SHOTORG = 46; // compressShotOrigin
158 const float STAT_LEADLIMIT = 47;
159 const float STAT_WEAPON_CLIPLOAD = 48;
160 const float STAT_WEAPON_CLIPSIZE = 49;
161 const float STAT_NEX_CHARGE = 50;
162 const float STAT_LAST_PICKUP = 51;
163 const float STAT_HUD = 52;
164 const float STAT_NEX_CHARGEPOOL = 53;
165 const float STAT_HIT_TIME = 54;
166 const float STAT_TYPEHIT_TIME = 55;
167 const float STAT_LAYED_MINES = 56;
168 const float STAT_HAGAR_LOAD = 57;
169 const float STAT_SWITCHINGWEAPON = 58;
170 const float STAT_SUPERWEAPONS_FINISHED = 59;
171
172 // see DP source, quakedef.h
173 const float STAT_MOVEVARS_AIRSPEEDLIMIT_NONQW = 222;
174 const float STAT_MOVEVARS_AIRSTRAFEACCEL_QW = 223;
175 const float STAT_MOVEVARS_MAXSPEED = 244;
176 const float STAT_MOVEVARS_AIRACCEL_QW = 254;
177
178 const float CTF_STATE_ATTACK = 1;
179 const float CTF_STATE_DEFEND = 2;
180 const float CTF_STATE_COMMANDER = 3;
181
182 const float HUD_NORMAL = 0;
183 const float HUD_VEHICLE_FIRST   = 10;
184 const float HUD_SPIDERBOT       = 10;
185 const float HUD_WAKIZASHI       = 11;
186 const float HUD_RAPTOR          = 12;
187 const float HUD_BUMBLEBEE       = 13;
188 const float HUD_BUMBLEBEE_GUN   = 14;
189 const float HUD_VEHICLE_LAST    = 14;
190
191 const vector eX = '1 0 0';
192 const vector eY = '0 1 0';
193 const vector eZ = '0 0 1';
194
195 const float STAT_VEHICLESTAT_HEALTH  = 60;
196 const float STAT_VEHICLESTAT_SHIELD  = 61;
197 const float STAT_VEHICLESTAT_ENERGY  = 62;
198 const float STAT_VEHICLESTAT_AMMO1   = 63;
199 const float STAT_VEHICLESTAT_RELOAD1 = 64;
200 const float STAT_VEHICLESTAT_AMMO2   = 65;
201 const float STAT_VEHICLESTAT_RELOAD2 = 66;
202
203 const float STAT_SECRETS_TOTAL = 70;
204 const float STAT_SECRETS_FOUND = 71;
205
206 // mod stats (1xx)
207 const float STAT_REDALIVE = 100;
208 const float STAT_BLUEALIVE = 101;
209 const float STAT_YELLOWALIVE = 102;
210 const float STAT_PINKALIVE = 103;
211
212 // freeze tag
213 const float STAT_FROZEN = 104;
214 const float STAT_REVIVE_PROGRESS = 105;
215
216
217 const float STAT_DOM_TOTAL_PPS = 100;
218 const float STAT_DOM_PPS_RED = 101;
219 const float STAT_DOM_PPS_BLUE = 102;
220 const float STAT_DOM_PPS_PINK = 103;
221 const float STAT_DOM_PPS_YELLOW = 104;
222
223 //const float STAT_SPIDERBOT_AIM     53 // compressShotOrigin
224 //const float STAT_SPIDERBOT_TARGET  54 // compressShotOrigin
225
226 // moved that here so the client knows the max.
227 // # of maps, I'll use arrays for them :P
228 #define MAPVOTE_COUNT 10
229
230 /**
231  * Lower scores are better (e.g. suicides)
232  */
233 #define SFL_LOWER_IS_BETTER     1
234
235 /**
236  * Don't show zero values as scores
237  */
238 #define SFL_HIDE_ZERO           2
239
240 /**
241  * Allow a column to be hidden (do not automatically add it even if it is a sorting key)
242  */
243 #define SFL_ALLOW_HIDE         16
244
245 /**
246  * Display as a rank (with st, nd, rd, th suffix)
247  */
248 #define SFL_RANK               32
249
250 /**
251  * Display as mm:ss.s, value is stored as 10ths of a second (AND 0 is the worst possible value!)
252  */
253 #define SFL_TIME               64
254
255 // not an extra constant yet
256 #define SFL_ZERO_IS_WORST SFL_TIME
257
258 /**
259  * Scoring priority (NOTE: PRIMARY is used for fraglimit)
260  */
261 #define SFL_SORT_PRIO_SECONDARY 4
262 #define SFL_SORT_PRIO_PRIMARY   8
263 #define SFL_SORT_PRIO_MASK     12
264
265 /**
266  * Score indices
267  */
268 #define MAX_SCORE 10
269 #define MAX_TEAMSCORE 2
270
271 #define ST_SCORE 0
272 #define SP_KILLS 0
273 #define SP_DEATHS 1
274 #define SP_SUICIDES 2
275 #define SP_SCORE 3
276 // game mode specific indices are not in common/, but in server/scores_rules.qc!
277
278 #ifdef COMPAT_XON010_CHANNELS
279 float CH_INFO = 0; // only on world and csqc
280 float CH_TRIGGER = 0; // only on players; compat: FALSELY CONTROLLED BY "Info"
281 float CH_WEAPON_A = 1; // only on players and entities
282 float CH_WEAPON_SINGLE = 5; // only on players and entities
283 float CH_VOICE = 2; // only on players
284 float CH_BGM_SINGLE = 2; // only on csqc; compat: FALSELY CONTROLLED BY "Voice"
285 float CH_AMBIENT = 2; // only on csqc; compat: FALSELY CONTROLLED BY "Voice"
286 float CH_TRIGGER_SINGLE = 3; // only on players, entities, csqc
287 float CH_SHOTS = 4; // only on players, entities, csqc
288 float CH_SHOTS_SINGLE = 4; // only on players, entities, csqc
289 float CH_WEAPON_B = 5; // only on players and entities
290 float CH_PAIN = 6; // only on players and csqc
291 float CH_PAIN_SINGLE = 6; // only on players and csqc
292 float CH_PLAYER = 7; // only on players and entities
293 float CH_TUBA = 5; // only on csqc
294 #else
295 float CH_INFO = 0;
296 float CH_TRIGGER = -3;
297 float CH_WEAPON_A = -1;
298 float CH_WEAPON_SINGLE = 1;
299 float CH_VOICE = -2;
300 float CH_BGM_SINGLE = 8;
301 float CH_AMBIENT = -9;
302 float CH_TRIGGER_SINGLE = 3;
303 float CH_SHOTS = -4;
304 float CH_SHOTS_SINGLE = 4;
305 float CH_WEAPON_B = -1;
306 float CH_PAIN = -6;
307 float CH_PAIN_SINGLE = 6;
308 float CH_PLAYER = -7;
309 float CH_TUBA = 5;
310 #endif
311
312 float   ATTN_NONE                               = 0;
313 float   ATTN_MIN                                = 0.015625;
314 float   ATTN_NORM                               = 0.5;
315 float   ATTN_LARGE                              = 1;
316 float   ATTN_IDLE                               = 2;
317 float   ATTN_STATIC                             = 3;
318 float   ATTN_MAX                                = 3.984375;
319
320 #define VOL_BASE 0.7
321 #define VOL_BASEVOICE 1.0
322
323 // this sets sounds and other properties of the projectiles in csqc
324 float PROJECTILE_ELECTRO = 1;
325 float PROJECTILE_ROCKET = 2;
326 float PROJECTILE_TAG = 3;
327 float PROJECTILE_BULLET = 4;
328 float PROJECTILE_CRYLINK = 5;
329 float PROJECTILE_ELECTRO_BEAM = 6;
330 float PROJECTILE_GRENADE = 7;
331 float PROJECTILE_GRENADE_BOUNCING = 8;
332 float PROJECTILE_MINE = 9;
333 float PROJECTILE_LASER = 10;
334 float PROJECTILE_HLAC = 11;
335 float PROJECTILE_SEEKER = 12;
336 float PROJECTILE_FLAC = 13;
337 float PROJECTILE_PORTO_RED = 14;
338 float PROJECTILE_PORTO_BLUE = 15;
339 float PROJECTILE_HOOKBOMB = 16;
340 float PROJECTILE_HAGAR = 17;
341 float PROJECTILE_HAGAR_BOUNCING = 18;
342 float PROJECTILE_BULLET_GLOWING = 19;
343 float PROJECTILE_CRYLINK_BOUNCING = 20;
344 float PROJECTILE_FIREBALL = 21;
345 float PROJECTILE_FIREMINE = 22;
346 float PROJECTILE_BULLET_GLOWING_TRACER = 23;
347
348 float PROJECTILE_RAPTORCANNON   = 24;
349 float PROJECTILE_RAPTORBOMB     = 25;
350 float PROJECTILE_RAPTORBOMBLET  = 26;
351 float PROJECTILE_SPIDERROCKET   = 27;
352 float PROJECTILE_WAKIROCKET     = 28;
353 float PROJECTILE_WAKICANNON     = 29;
354
355 float PROJECTILE_BUMBLE_GUN     = 30;
356 float PROJECTILE_BUMBLE_BEAM    = 31;
357
358 float SPECIES_HUMAN        =  0;
359 float SPECIES_ROBOT_SOLID  =  1;
360 float SPECIES_ALIEN        =  2;
361 float SPECIES_ANIMAL       =  3;
362 float SPECIES_ROBOT_RUSTY  =  4;
363 float SPECIES_ROBOT_SHINY  =  5;
364 float SPECIES_RESERVED     = 15;
365
366 // Deathtypes (weapon deathtypes are the IT_* constants below)
367 // NOTE: when adding death types, please add an explanation to Docs/spamlog.txt too.
368 #define VAR_TO_TEXT2(var) #var
369 #define CHECK_FIELD_COUNT(field,first,count) if(!field) { field = (first + count); ++count; }
370 #define CHECK_MAX_DEATHTYPES(name,count) if(count == DT_MAX) { error(strcat("Maximum deathtypes hit: ", VAR_TO_TEXT2(name), ": ", ftos(count), ".\n")); }
371
372 #define DT_FIRST 10000
373 #define DT_MAX 1024 // limit of recursive functions with ACCUMULATE_FUNCTION
374 float DT_COUNT;
375
376 #define DEATHTYPE(name,type,notification) \
377         float name; \
378         void DecDeathtype_##name() \
379         { \
380                 CHECK_FIELD_COUNT(name, DT_FIRST, DT_COUNT) \
381                 CHECK_MAX_DEATHTYPES(name, DT_COUNT) \
382         }
383         //ACCUMULATE_FUNCTION(DecDeathtypes, DecDeathtype_##name)
384
385 #define DEATHTYPES \
386         DEATHTYPE(DEATH_SPECIAL_START, MSG_CENTER, FALSE) \
387         #undef DEATHTYPE
388
389 DEATHTYPES
390
391 float DEATH_SPECIAL_START = 10000;
392 float DEATH_FALL = 10000;
393 float DEATH_TELEFRAG = 10001;
394 float DEATH_DROWN = 10002;
395 float DEATH_HURTTRIGGER = 10003;
396 float DEATH_LAVA = 10004;
397 float DEATH_SLIME = 10005;
398 float DEATH_KILL = 10006;
399 float DEATH_NOAMMO = 10007;
400 float DEATH_SWAMP = 10008;
401 float DEATH_TEAMCHANGE = 10009;
402 float DEATH_AUTOTEAMCHANGE = 10010;
403 float DEATH_CAMP = 10011;
404 float DEATH_SHOOTING_STAR = 10012;
405 float DEATH_ROT = 10013;
406 float DEATH_MIRRORDAMAGE = 10014;
407 float DEATH_TOUCHEXPLODE = 10015;
408 float DEATH_CHEAT = 10016;
409 float DEATH_FIRE = 10017;
410 float DEATH_QUIET = 10021;
411
412 float  DEATH_VHFIRST       = 10030;
413 float  DEATH_VHCRUSH       = 10030;
414 float  DEATH_SBMINIGUN     = 10031;
415 float  DEATH_SBROCKET      = 10032;
416 float  DEATH_SBBLOWUP      = 10033;
417 float  DEATH_WAKIGUN       = 10034;
418 float  DEATH_WAKIROCKET    = 10035;
419 float  DEATH_WAKIBLOWUP    = 10036;
420 float  DEATH_RAPTOR_CANNON = 10037;
421 float  DEATH_RAPTOR_BOMB   = 10038;
422 float  DEATH_RAPTOR_BOMB_SPLIT = 10039;
423 float  DEATH_RAPTOR_DEATH   = 10040;
424 float  DEATH_BUMB_GUN       = 10041;
425 float  DEATH_BUMB_RAY       = 10042;
426 float  DEATH_BUMB_RAY_HEAL  = 10043;
427 float  DEATH_BUMB_DEATH     = 10044;
428 float  DEATH_VHLAST         = 10044;
429 #define DEATH_ISVEHICLE(t)  ((t) >= DEATH_VHFIRST && (t) <= DEATH_VHLAST)
430
431 float DEATH_GENERIC = 10050;
432
433 float DEATH_WEAPON = 10100;
434
435 float DEATH_CUSTOM = 10300;
436
437 float DEATH_TURRET                  = 10500;
438 float DEATH_TURRET_EWHEEL           = 10501;
439 float DEATH_TURRET_FLAC             = 10502;
440 float DEATH_TURRET_MACHINEGUN       = 10503;
441 float DEATH_TURRET_WALKER_GUN       = 10504;
442 float DEATH_TURRET_WALKER_MEELE     = 10505;
443 float DEATH_TURRET_WALKER_ROCKET    = 10506;
444 float DEATH_TURRET_HELLION          = 10507;
445 float DEATH_TURRET_HK               = 10508;
446 float DEATH_TURRET_MLRS             = 10509;
447 float DEATH_TURRET_PLASMA           = 10510;
448 float DEATH_TURRET_PHASER           = 10511;
449 float DEATH_TURRET_TESLA            = 10512;
450 float DEATH_TURRET_LAST            = 10512;
451
452 float DEATH_WEAPONMASK = 0xFF;
453 float DEATH_HITTYPEMASK = 0x1F00; // which is WAY below 10000 used for normal deaths
454 float HITTYPE_SECONDARY = 0x100;
455 float HITTYPE_SPLASH = 0x200; // automatically set by RadiusDamage
456 float HITTYPE_BOUNCE = 0x400;
457 float HITTYPE_HEADSHOT = 0x800; // automatically set by Damage (if headshotbonus is set)
458 float HITTYPE_RESERVED = 0x1000; // unused yet
459
460 // macros to access these
461 #define DEATH_ISTURRET(t)            ((t) >= DEATH_TURRET && (t) <= DEATH_TURRET_LAST)
462 #define DEATH_ISSPECIAL(t)            ((t) >= DEATH_SPECIAL_START)
463 #define DEATH_WEAPONOFWEAPONDEATH(t)  ((t) & DEATH_WEAPONMASK)
464 #define DEATH_ISWEAPON(t,w)           (!DEATH_ISSPECIAL(t) && DEATH_WEAPONOFWEAPONDEATH(t) == (w))
465 #define DEATH_WEAPONOF(t)             (DEATH_ISSPECIAL(t) ? 0 : DEATH_WEAPONOFWEAPONDEATH(t))
466 #define WEP_VALID(w)                  ((w) >= WEP_FIRST && (w) <= WEP_LAST)
467
468 #define FRAGS_PLAYER 0
469 #define FRAGS_SPECTATOR -666
470 #define FRAGS_LMS_LOSER -616
471 #define FRAGS_PLAYER_NONSOLID -616
472 // we can use this frags value for both
473
474 // water levels
475 float WATERLEVEL_NONE = 0;
476 float WATERLEVEL_WETFEET = 1;
477 float WATERLEVEL_SWIMMING = 2;
478 float WATERLEVEL_SUBMERGED = 3;
479
480 float MAX_SHOT_DISTANCE = 32768;
481
482 //centerprint ID list
483 float CPID_TEAMCHANGE = 1;
484 float CPID_CTF_CAPTURESHIELD = 2;
485 float CPID_MINSTA_FINDAMMO = 3;
486 float CPID_NIX_WPNCHANGE = 4;
487 float CPID_DISCONNECT_IDLING = 5;
488 float CPID_ROUND_STARTING = 6;
489 float CPID_GAME_STARTING = 7;
490 float CPID_TIMEOUT_COUNTDOWN = 8;
491 float CPID_MOTD = 9;
492 float CPID_KH_MSG = 10;
493 float CPID_PREVENT_JOIN = 11;
494
495 // CSQC centerprint/notify message types
496 float MSG_SUICIDE = 0;
497 float MSG_KILL = 1;
498 float MSG_SPREE = 2;
499 float MSG_KILL_ACTION = 3;
500 float MSG_KILL_ACTION_SPREE = 4;
501 float MSG_INFO = 5;
502 float MSG_KA = 6;
503 float MSG_RACE = 10;
504
505 float KILL_TEAM_RED = 12001;
506 float KILL_TEAM_BLUE = 12002;
507 float KILL_TEAM_SPREE = 12003;
508 float KILL_FIRST_BLOOD = 12004;
509 float KILL_FIRST_VICTIM = 12005;
510 float KILL_TYPEFRAG = 12006;
511 float KILL_TYPEFRAGGED = 12007;
512 float KILL_FRAG = 12008;
513 float KILL_FRAGGED = 12009;
514 float KILL_SPREE = 12010;
515 float KILL_END_SPREE = 12011;
516 float KILL_SPREE_3 = 12012;
517 float KILL_SPREE_5 = 12013;
518 float KILL_SPREE_10 = 12014;
519 float KILL_SPREE_15 = 12015;
520 float KILL_SPREE_20 = 12016;
521 float KILL_SPREE_25 = 12017;
522 float KILL_SPREE_30 = 12018;
523
524 float INFO_GOTFLAG = 13001;
525 float INFO_PICKUPFLAG = 13002;
526 float INFO_LOSTFLAG = 13003;
527 float INFO_RETURNFLAG = 13004;
528 float INFO_CAPTUREFLAG = 13005;
529
530 float KA_PICKUPBALL = 14001;
531 float KA_DROPBALL = 14002;
532
533 float RACE_SERVER_RECORD = 15001;
534 float RACE_NEW_TIME = 15002;
535 float RACE_NEW_RANK = 15003;
536 float RACE_FAIL = 15004;
537
538 // weapon requests
539 float WR_SETUP          = 1; // (SVQC) setup weapon data
540 float WR_THINK          = 2; // (SVQC) logic to run every frame
541 float WR_CHECKAMMO1     = 3; // (SVQC) checks ammo for weapon
542 float WR_CHECKAMMO2     = 4; // (SVQC) checks ammo for weapon
543 float WR_AIM            = 5; // (SVQC) runs bot aiming code for this weapon
544 float WR_PRECACHE       = 6; // (CSQC and SVQC) precaches models/sounds used by this weapon
545 float WR_SUICIDEMESSAGE = 7; // (CSQC) sets w_deathtypestring or leaves it alone (and may inspect w_deathtype for details)
546 float WR_KILLMESSAGE    = 8; // (CSQC) sets w_deathtypestring or leaves it alone
547 float WR_RELOAD         = 9; // (SVQC) does not need to do anything
548 float WR_RESETPLAYER    = 10; // (SVQC) does not need to do anything
549 float WR_IMPACTEFFECT   = 11; // (CSQC) impact effect
550 float WR_SWITCHABLE     = 12; // (CSQC) impact effect
551 float WR_PLAYERDEATH    = 13; // (SVQC) does not need to do anything
552 float WR_GONETHINK      = 14; // (SVQC) logic to run every frame, also if no longer having the weapon as long as the switch away has not been performed
553
554 float HUD_PANEL_WEAPONS         = 0;
555 float HUD_PANEL_AMMO            = 1;
556 float HUD_PANEL_POWERUPS        = 2;
557 float HUD_PANEL_HEALTHARMOR     = 3;
558 float HUD_PANEL_NOTIFY          = 4;
559 float HUD_PANEL_TIMER           = 5;
560 float HUD_PANEL_RADAR           = 6;
561 float HUD_PANEL_SCORE           = 7;
562 float HUD_PANEL_RACETIMER       = 8;
563 float HUD_PANEL_VOTE            = 9;
564 float HUD_PANEL_MODICONS        = 10;
565 float HUD_PANEL_PRESSEDKEYS     = 11;
566 float HUD_PANEL_CHAT            = 12;
567 float HUD_PANEL_ENGINEINFO      = 13;
568 float HUD_PANEL_INFOMESSAGES    = 14;
569 float HUD_PANEL_PHYSICS = 15;
570 float HUD_PANEL_CENTERPRINT     = 16;
571 float HUD_PANEL_NUM             = 17; // always last panel id + 1, please increment when adding a new panel
572
573 string HUD_PANELNAME_WEAPONS            = "weapons";
574 string HUD_PANELNAME_AMMO               = "ammo";
575 string HUD_PANELNAME_POWERUPS           = "powerups";
576 string HUD_PANELNAME_HEALTHARMOR        = "healtharmor";
577 string HUD_PANELNAME_NOTIFY             = "notify";
578 string HUD_PANELNAME_TIMER              = "timer";
579 string HUD_PANELNAME_RADAR              = "radar";
580 string HUD_PANELNAME_SCORE              = "score";
581 string HUD_PANELNAME_RACETIMER          = "racetimer";
582 string HUD_PANELNAME_VOTE               = "vote";
583 string HUD_PANELNAME_MODICONS           = "modicons";
584 string HUD_PANELNAME_PRESSEDKEYS        = "pressedkeys";
585 string HUD_PANELNAME_CHAT               = "chat";
586 string HUD_PANELNAME_ENGINEINFO         = "engineinfo";
587 string HUD_PANELNAME_INFOMESSAGES       = "infomessages";
588 string HUD_PANELNAME_PHYSICS    = "physics";
589 string HUD_PANELNAME_CENTERPRINT        = "centerprint";
590
591 #define SERVERFLAG_ALLOW_FULLBRIGHT 1
592 #define SERVERFLAG_TEAMPLAY 2
593 #define SERVERFLAG_PLAYERSTATS 4
594
595 // FIXME/EXPLAINME: why?
596 noref var vector autocvar_sv_player_maxs = '16 16 45';
597 noref var vector autocvar_sv_player_mins = '-16 -16 -24';
598 noref var vector autocvar_sv_player_viewoffset = '0 0 20';
599 noref var vector autocvar_sv_player_crouch_maxs = '16 16 25';
600 noref var vector autocvar_sv_player_crouch_mins = '-16 -16 -24';
601 noref var vector autocvar_sv_player_crouch_viewoffset = '0 0 20';
602 noref var vector autocvar_sv_player_headsize = '24 24 12';
603
604 #define PL_VIEW_OFS autocvar_sv_player_viewoffset
605 #define PL_MIN autocvar_sv_player_mins
606 #define PL_MAX autocvar_sv_player_maxs
607 #define PL_CROUCH_VIEW_OFS autocvar_sv_player_crouch_viewoffset
608 #define PL_CROUCH_MIN autocvar_sv_player_crouch_mins
609 #define PL_CROUCH_MAX autocvar_sv_player_crouch_maxs
610 #define PL_HEAD autocvar_sv_player_headsize
611
612 // helpers
613 #define PL_VIEW_OFS_z autocvar_sv_player_viewoffset_z
614 #define PL_MIN_z autocvar_sv_player_mins_z
615 #define PL_MAX_z autocvar_sv_player_maxs_z
616 #define PL_CROUCH_VIEW_OFS_z autocvar_sv_player_crouch_viewoffset_z
617 #define PL_CROUCH_MIN_z autocvar_sv_player_mins_z
618 #define PL_HEAD_x autocvar_sv_player_headsize_x
619 #define PL_HEAD_y autocvar_sv_player_headsize_y
620 #define PL_HEAD_z autocvar_sv_player_headsize_z
621
622 // spawnpoint prios
623 #define SPAWN_PRIO_NEAR_TEAMMATE_FOUND    200
624 #define SPAWN_PRIO_NEAR_TEAMMATE_SAMETEAM 100
625 #define SPAWN_PRIO_RACE_PREVIOUS_SPAWN     50
626 #define SPAWN_PRIO_GOOD_DISTANCE           10
627
628 // URI handles
629 #define URI_GET_DISCARD              0
630 #define URI_GET_IPBAN                1
631 #define URI_GET_IPBAN_END           16
632 #define URI_GET_CURL                17
633 #define URI_GET_CURL_END            32
634 #define URI_GET_UPDATENOTIFICATION  33
635 #define URI_GET_URLLIB             128
636 #define URI_GET_URLLIB_END         191