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