-// COMMIT-TODO: Update if necessary before committing
-// Revision 1: additional statistics sent (flag caps, returns, deaths)
-// Revision 2: Mapvote preview pictures
-// Revision 3: optimized map vote protocol
-// Revision 4: CSQC config var system
-// Revision 5: mapvote time fix
-// Revision 6: more robust against packet loss/delays, also show not yet connected clients
-// Revision 7: packet loss column
-// Revision 8: race
-// Revision 9: race delta
-// Revision 10: scoreboard force
-// Revision 11: scoreboard unforce; spectator support beginning
-// Revision 12: smaller scores updates (SERVER: requires new engine)
-// Revision 13: pointparticles
-// Revision 14: laser
-// Revision 15: zoom
-// Revision 16: multi-weapons
-// Revision 17: multi-weaponimpulses
-// Revision 18: warmup
-// Revision 19: fog
-// Revision 20: naggers
-// Revision 21: entcs for players optimized (position data down from 12 to 7 bytes); waypointsprites in csqc for team radar
-// Revision 22: hook shot origin
-#define CSQC_REVISION 22
-
const float AS_STRING = 1;
const float AS_INT = 2;
const float AS_FLOAT_TRUNCATED = 2;
const float TE_CSQC_PICTURE = 100;
const float TE_CSQC_RACE = 101;
-const float TE_CSQC_NEXGUNBEAMPARTICLE = 103;
-const float TE_CSQC_LIGHTNINGARC = 104;
+const float TE_CSQC_VORTEXBEAMPARTICLE = 103;
+const float TE_CSQC_ARC = 104;
const float TE_CSQC_TEAMNAGGER = 105;
const float TE_CSQC_PINGPLREPORT = 106;
const float TE_CSQC_TARGET_MUSIC = 107;
const float TE_CSQC_WEAPONCOMPLAIN = 108;
-const float TE_CSQC_NEX_SCOPE = 109;
+const float TE_CSQC_VORTEX_SCOPE = 109;
const float TE_CSQC_MINELAYER_MAXMINES = 110;
const float TE_CSQC_HAGAR_MAXROCKETS = 111;
const float TE_CSQC_VEHICLESETUP = 112;
const float TE_CSQC_SVNOTICE = 113;
+const float TE_CSQC_SHOCKWAVEPARTICLE = 114;
const float RACE_NET_CHECKPOINT_HIT_QUALIFYING = 0; // byte checkpoint, short time, short recordtime, string recordholder
const float RACE_NET_CHECKPOINT_CLEAR = 1;
const float ENT_CLIENT_WARPZONE_CAMERA = 25;
const float ENT_CLIENT_TRIGGER_MUSIC = 26;
const float ENT_CLIENT_HOOK = 27;
-const float ENT_CLIENT_LGBEAM = 28;
-const float ENT_CLIENT_GAUNTLET = 29;
+const float ENT_CLIENT_ARC_BEAM = 29; // WEAPONTODO: fix numbers
const float ENT_CLIENT_ACCURACY = 30;
const float ENT_CLIENT_SHOWNAMES = 31;
const float ENT_CLIENT_WARPZONE_TELEPORTED = 32;
const float ENT_CLIENT_SPAWNPOINT = 36;
const float ENT_CLIENT_SPAWNEVENT = 37;
const float ENT_CLIENT_NOTIFICATION = 38;
-
+const float ENT_CLIENT_ELIMINATEDPLAYERS = 39;
const float ENT_CLIENT_TURRET = 40;
const float ENT_CLIENT_AUXILIARYXHAIR = 50;
const float ENT_CLIENT_VEHICLE = 60;
+const float ENT_CLIENT_HEALING_ORB = 80;
+
const float SPRITERULE_DEFAULT = 0;
const float SPRITERULE_TEAMPLAY = 1;
///////////////////////////
// csqc communication stuff
-const float STAT_KH_KEYS = 32;
-const float STAT_CTF_STATE = 33;
-const float STAT_WEAPONS = 35;
-const float STAT_SWITCHWEAPON = 36;
-const float STAT_GAMESTARTTIME = 37;
-const float STAT_STRENGTH_FINISHED = 38;
-const float STAT_INVINCIBLE_FINISHED = 39;
-const float STAT_PRESSED_KEYS = 42;
-const float STAT_ALLOW_OLDNEXBEAM = 43; // this stat could later contain some other bits of info, like, more server-side particle config
-const float STAT_FUEL = 44;
-const float STAT_NB_METERSTART = 45;
-const float STAT_SHOTORG = 46; // compressShotOrigin
-const float STAT_LEADLIMIT = 47;
-const float STAT_WEAPON_CLIPLOAD = 48;
-const float STAT_WEAPON_CLIPSIZE = 49;
-const float STAT_NEX_CHARGE = 50;
-const float STAT_LAST_PICKUP = 51;
-const float STAT_HUD = 52;
-const float STAT_NEX_CHARGEPOOL = 53;
-const float STAT_HIT_TIME = 54;
-const float STAT_TYPEHIT_TIME = 55;
-const float STAT_LAYED_MINES = 56;
-const float STAT_HAGAR_LOAD = 57;
-const float STAT_SWITCHINGWEAPON = 58;
-const float STAT_SUPERWEAPONS_FINISHED = 59;
-
-const float STAT_VEHICLESTAT_HEALTH = 60;
-const float STAT_VEHICLESTAT_SHIELD = 61;
-const float STAT_VEHICLESTAT_ENERGY = 62;
-const float STAT_VEHICLESTAT_AMMO1 = 63;
-const float STAT_VEHICLESTAT_RELOAD1 = 64;
-const float STAT_VEHICLESTAT_AMMO2 = 65;
-const float STAT_VEHICLESTAT_RELOAD2 = 66;
-
-const float STAT_SECRETS_TOTAL = 70;
-const float STAT_SECRETS_FOUND = 71;
-
-const float STAT_RESPAWN_TIME = 72;
-const float STAT_ROUNDSTARTTIME = 73;
-
-const float STAT_WEAPONS2 = 74;
-const float STAT_WEAPONS3 = 75;
-
-const float STAT_MONSTERS_TOTAL = 76;
-const float STAT_MONSTERS_KILLED = 77;
-
-// mod stats (1xx)
-const float STAT_REDALIVE = 100;
-const float STAT_BLUEALIVE = 101;
-const float STAT_YELLOWALIVE = 102;
-const float STAT_PINKALIVE = 103;
-
-// freeze tag
-const float STAT_FROZEN = 104;
-const float STAT_REVIVE_PROGRESS = 105;
-
-// domination
-const float STAT_DOM_TOTAL_PPS = 100;
-const float STAT_DOM_PPS_RED = 101;
-const float STAT_DOM_PPS_BLUE = 102;
-const float STAT_DOM_PPS_PINK = 103;
-const float STAT_DOM_PPS_YELLOW = 104;
-
-//const float STAT_SPIDERBOT_AIM 53 // compressShotOrigin
-//const float STAT_SPIDERBOT_TARGET 54 // compressShotOrigin
-
-// see DP source, quakedef.h
-const float STAT_MOVEVARS_AIRSPEEDLIMIT_NONQW = 222;
-const float STAT_MOVEVARS_AIRSTRAFEACCEL_QW = 223;
-const float STAT_MOVEVARS_MAXSPEED = 244;
-const float STAT_MOVEVARS_AIRACCEL_QW = 254;
-
const float CTF_STATE_ATTACK = 1;
const float CTF_STATE_DEFEND = 2;
const float CTF_STATE_COMMANDER = 3;
// moved that here so the client knows the max.
// # of maps, I'll use arrays for them :P
-#define MAPVOTE_COUNT 10
+const float MAPVOTE_COUNT = 30;
/**
* Lower scores are better (e.g. suicides)
*/
-#define SFL_LOWER_IS_BETTER 1
+const float SFL_LOWER_IS_BETTER = 1;
/**
* Don't show zero values as scores
*/
-#define SFL_HIDE_ZERO 2
+const float SFL_HIDE_ZERO = 2;
/**
* Allow a column to be hidden (do not automatically add it even if it is a sorting key)
*/
-#define SFL_ALLOW_HIDE 16
+const float SFL_ALLOW_HIDE = 16;
/**
* Display as a rank (with st, nd, rd, th suffix)
*/
-#define SFL_RANK 32
+const float SFL_RANK = 32;
/**
* Display as mm:ss.s, value is stored as 10ths of a second (AND 0 is the worst possible value!)
*/
-#define SFL_TIME 64
+const float SFL_TIME = 64;
// not an extra constant yet
#define SFL_ZERO_IS_WORST SFL_TIME
/**
* Scoring priority (NOTE: PRIMARY is used for fraglimit)
*/
-#define SFL_SORT_PRIO_SECONDARY 4
-#define SFL_SORT_PRIO_PRIMARY 8
-#define SFL_SORT_PRIO_MASK 12
+const float SFL_SORT_PRIO_SECONDARY = 4;
+const float SFL_SORT_PRIO_PRIMARY = 8;
+const float SFL_SORT_PRIO_MASK = 12;
/**
* Score indices
#define MAX_SCORE 10
#define MAX_TEAMSCORE 2
-#define ST_SCORE 0
-#define SP_KILLS 0
-#define SP_DEATHS 1
-#define SP_SUICIDES 2
-#define SP_SCORE 3
+const float ST_SCORE = 0;
+const float SP_KILLS = 0;
+const float SP_DEATHS = 1;
+const float SP_SUICIDES = 2;
+const float SP_SCORE = 3;
// game mode specific indices are not in common/, but in server/scores_rules.qc!
const float CH_INFO = 0;
const float ATTEN_STATIC = 3;
const float ATTEN_MAX = 3.984375;
-#define VOL_BASE 0.7
-#define VOL_BASEVOICE 1.0
+const float VOL_BASE = 0.7;
+const float VOL_BASEVOICE = 1.0;
-// this sets sounds and other properties of the projectiles in csqc
+// WEAPONTODO: move this into separate/new projectile handling code // this sets sounds and other properties of the projectiles in csqc
const float PROJECTILE_ELECTRO = 1;
const float PROJECTILE_ROCKET = 2;
const float PROJECTILE_TAG = 3;
const float PROJECTILE_GRENADE = 7;
const float PROJECTILE_GRENADE_BOUNCING = 8;
const float PROJECTILE_MINE = 9;
-const float PROJECTILE_LASER = 10;
+const float PROJECTILE_BLASTER = 10;
const float PROJECTILE_HLAC = 11;
const float PROJECTILE_SEEKER = 12;
const float PROJECTILE_FLAC = 13;
const float PROJECTILE_MAGE_SPIKE = 32;
const float PROJECTILE_SHAMBLER_LIGHTNING = 33;
-const float PROJECTILE_NADE_RED = 50;
-const float PROJECTILE_NADE_RED_BURN = 51;
-const float PROJECTILE_NADE_BLUE = 52;
-const float PROJECTILE_NADE_BLUE_BURN = 53;
-const float PROJECTILE_NADE_YELLOW = 54;
-const float PROJECTILE_NADE_YELLOW_BURN = 55;
-const float PROJECTILE_NADE_PINK = 56;
-const float PROJECTILE_NADE_PINK_BURN = 57;
-const float PROJECTILE_NADE = 58;
-const float PROJECTILE_NADE_BURN = 59;
+const float PROJECTILE_RPC = 60;
const float SPECIES_HUMAN = 0;
const float SPECIES_ROBOT_SOLID = 1;
const float SPECIES_ROBOT_SHINY = 5;
const float SPECIES_RESERVED = 15;
-#define FRAGS_PLAYER 0
-#define FRAGS_SPECTATOR -666
-#define FRAGS_LMS_LOSER -616
-#define FRAGS_PLAYER_NONSOLID -616
+const float FRAGS_PLAYER = 0;
+const float FRAGS_SPECTATOR = -666;
+const float FRAGS_LMS_LOSER = -616;
+const float FRAGS_PLAYER_NONSOLID = -616;
// we can use this frags value for both
// water levels
const float WATERLEVEL_WETFEET = 1;
const float WATERLEVEL_SWIMMING = 2;
const float WATERLEVEL_SUBMERGED = 3;
-
-const float MAX_SHOT_DISTANCE = 32768;
-
-// weapon requests
-const float WR_SETUP = 1; // (SVQC) setup weapon data
-const float WR_THINK = 2; // (SVQC) logic to run every frame
-const float WR_CHECKAMMO1 = 3; // (SVQC) checks ammo for weapon
-const float WR_CHECKAMMO2 = 4; // (SVQC) checks ammo for weapon
-const float WR_AIM = 5; // (SVQC) runs bot aiming code for this weapon
-const float WR_PRECACHE = 6; // (CSQC and SVQC) precaches models/sounds used by this weapon
-const float WR_SUICIDEMESSAGE = 7; // (SVQC) notification number for suicide message (may inspect w_deathtype for details)
-const float WR_KILLMESSAGE = 8; // (SVQC) notification number for kill message (may inspect w_deathtype for details)
-const float WR_RELOAD = 9; // (SVQC) does not need to do anything
-const float WR_RESETPLAYER = 10; // (SVQC) does not need to do anything
-const float WR_IMPACTEFFECT = 11; // (CSQC) impact effect
-const float WR_SWITCHABLE = 12; // (CSQC) impact effect
-const float WR_PLAYERDEATH = 13; // (SVQC) does not need to do anything
-const 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
-
-#define SERVERFLAG_ALLOW_FULLBRIGHT 1
-#define SERVERFLAG_TEAMPLAY 2
-#define SERVERFLAG_PLAYERSTATS 4
+const float SERVERFLAG_ALLOW_FULLBRIGHT = 1;
+const float SERVERFLAG_TEAMPLAY = 2;
+const float SERVERFLAG_PLAYERSTATS = 4;
// FIXME/EXPLAINME: why?
noref var vector autocvar_sv_player_maxs = '16 16 45';
#define PL_HEAD_z autocvar_sv_player_headsize_z
// spawnpoint prios
-#define SPAWN_PRIO_NEAR_TEAMMATE_FOUND 200
-#define SPAWN_PRIO_NEAR_TEAMMATE_SAMETEAM 100
-#define SPAWN_PRIO_RACE_PREVIOUS_SPAWN 50
-#define SPAWN_PRIO_GOOD_DISTANCE 10
+const float SPAWN_PRIO_NEAR_TEAMMATE_FOUND = 200;
+const float SPAWN_PRIO_NEAR_TEAMMATE_SAMETEAM = 100;
+const float SPAWN_PRIO_RACE_PREVIOUS_SPAWN = 50;
+const float SPAWN_PRIO_GOOD_DISTANCE = 10;
// URI handles
-#define URI_GET_DISCARD 0
-#define URI_GET_IPBAN 1
-#define URI_GET_IPBAN_END 16
-#define URI_GET_CURL 17
-#define URI_GET_CURL_END 32
-#define URI_GET_UPDATENOTIFICATION 33
-#define URI_GET_URLLIB 128
-#define URI_GET_URLLIB_END 191
+const float URI_GET_DISCARD = 0;
+const float URI_GET_IPBAN = 1;
+const float URI_GET_IPBAN_END = 16;
+const float URI_GET_CURL = 17;
+const float URI_GET_CURL_END = 32;
+const float URI_GET_UPDATENOTIFICATION = 33;
+const float URI_GET_URLLIB = 128;
+const float URI_GET_URLLIB_END = 191;
+
+// gametype votes
+const float GTV_AVAILABLE = 0;
+// for later use in per-map gametype filtering
+const float GTV_FORBIDDEN = 2;