X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fconstants.qh;h=07cf482f2791cb3c59f118ddce25bbd13743f5ec;hb=5fe5de2b53f7e8064fcb2dd1e2b469a6a55a5401;hp=c270689b6dccd77b3143d96a469ef03bb5cdda53;hpb=a5b077eb799e456094034cdc0dd0d5b5a7e1119e;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/constants.qh b/qcsrc/common/constants.qh index c270689b6..07cf482f2 100644 --- a/qcsrc/common/constants.qh +++ b/qcsrc/common/constants.qh @@ -1,28 +1,3 @@ -// 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; @@ -96,11 +71,13 @@ const float ENT_CLIENT_BUMBLE_RAYGUN = 35; 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; @@ -139,78 +116,6 @@ const float CVAR_READONLY = 4; /////////////////////////// // 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_VORTEX_CHARGE = 50; -const float STAT_LAST_PICKUP = 51; -const float STAT_HUD = 52; -const float STAT_VORTEX_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; @@ -230,32 +135,32 @@ const vector eZ = '0 0 1'; // 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 @@ -263,9 +168,9 @@ const vector eZ = '0 0 1'; /** * 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 @@ -273,30 +178,13 @@ const vector eZ = '0 0 1'; #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! -#ifdef COMPAT_XON010_CHANNELS -const float CH_INFO = 0; // only on world and csqc -const float CH_TRIGGER = 0; // only on players; compat: FALSELY CONTROLLED BY "Info" -const float CH_WEAPON_A = 1; // only on players and entities -const float CH_WEAPON_SINGLE = 5; // only on players and entities -const float CH_VOICE = 2; // only on players -const float CH_BGM_SINGLE = 2; // only on csqc; compat: FALSELY CONTROLLED BY "Voice" -const float CH_AMBIENT = 2; // only on csqc; compat: FALSELY CONTROLLED BY "Voice" -const float CH_TRIGGER_SINGLE = 3; // only on players, entities, csqc -const float CH_SHOTS = 4; // only on players, entities, csqc -const float CH_SHOTS_SINGLE = 4; // only on players, entities, csqc -const float CH_WEAPON_B = 5; // only on players and entities -const float CH_PAIN = 6; // only on players and csqc -const float CH_PAIN_SINGLE = 6; // only on players and csqc -const float CH_PLAYER = 7; // only on players and entities -const float CH_TUBA = 5; // only on csqc -#else const float CH_INFO = 0; const float CH_TRIGGER = -3; const float CH_WEAPON_A = -1; @@ -311,8 +199,8 @@ const float CH_WEAPON_B = -1; const float CH_PAIN = -6; const float CH_PAIN_SINGLE = 6; const float CH_PLAYER = -7; -const float CH_TUBA = 5; -#endif +const float CH_PLAYER_SINGLE = 7; +const float CH_TUBA_SINGLE = 5; const float ATTEN_NONE = 0; const float ATTEN_MIN = 0.015625; @@ -322,8 +210,8 @@ const float ATTEN_IDLE = 2; 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; // 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; @@ -360,16 +248,7 @@ const float PROJECTILE_BUMBLE_BEAM = 31; 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; @@ -379,10 +258,10 @@ const float SPECIES_ROBOT_RUSTY = 4; 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 @@ -390,9 +269,9 @@ const float WATERLEVEL_NONE = 0; const float WATERLEVEL_WETFEET = 1; const float WATERLEVEL_SWIMMING = 2; const float WATERLEVEL_SUBMERGED = 3; -#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'; @@ -422,17 +301,22 @@ noref var vector autocvar_sv_player_headsize = '24 24 12'; #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;