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