X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fconstants.qh;h=3e9795690165b3859408d6bc427c888e809971d9;hb=5dd3541b0f60354d303283c15c90a171efd58c15;hp=c59901b21475b5c7e505aee04a4167dcca0d0cbd;hpb=5043d85bbf5246ed541db900a95d3f18c01be602;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/constants.qh b/qcsrc/common/constants.qh index c59901b21..3e9795690 100644 --- a/qcsrc/common/constants.qh +++ b/qcsrc/common/constants.qh @@ -23,25 +23,6 @@ // Revision 22: hook shot origin #define CSQC_REVISION 22 -// probably put these in common/ -// so server/ and client/ can be synced better -const float GAME_DEATHMATCH = 1; -const float GAME_TEAM_DEATHMATCH = 2; -const float GAME_DOMINATION = 3; -const float GAME_CTF = 4; -const float GAME_RUNEMATCH = 5; -const float GAME_LMS = 6; -const float GAME_ARENA = 7; -const float GAME_KEYHUNT = 8; -const float GAME_ASSAULT = 9; -const float GAME_ONSLAUGHT = 10; -const float GAME_RACE = 11; -const float GAME_NEXBALL = 12; -const float GAME_CTS = 13; -const float GAME_CA = 14; -const float GAME_FREEZETAG = 15; -const float GAME_KEEPAWAY = 16; - const float AS_STRING = 1; const float AS_INT = 2; const float AS_FLOAT_TRUNCATED = 2; @@ -114,6 +95,7 @@ const float ENT_CLIENT_GAUNTLET = 29; const float ENT_CLIENT_ACCURACY = 30; const float ENT_CLIENT_SHOWNAMES = 31; const float ENT_CLIENT_WARPZONE_TELEPORTED = 32; +const float ENT_CLIENT_MODEL = 33; const float ENT_CLIENT_TURRET = 40; const float ENT_CLIENT_AUXILIARYXHAIR = 50; @@ -136,151 +118,6 @@ const float RADARICON_DOMPOINT = 1; const float RADARICON_POWERUP = 1; const float RADARICON_TAGGED = 1; -/////////////////////////// -// key constants - -// -// these are the key numbers that should be passed to Key_Event -// -const float K_TAB = 9; -const float K_ENTER = 13; -const float K_ESCAPE = 27; -const float K_SPACE = 32; - -// normal keys should be passed as lowercased ascii - -const float K_BACKSPACE = 127; -const float K_UPARROW = 128; -const float K_DOWNARROW = 129; -const float K_LEFTARROW = 130; -const float K_RIGHTARROW = 131; - -const float K_ALT = 132; -const float K_CTRL = 133; -const float K_SHIFT = 134; - -const float K_F1 = 135; -const float K_F2 = 136; -const float K_F3 = 137; -const float K_F4 = 138; -const float K_F5 = 139; -const float K_F6 = 140; -const float K_F7 = 141; -const float K_F8 = 142; -const float K_F9 = 143; -const float K_F10 = 144; -const float K_F11 = 145; -const float K_F12 = 146; - -const float K_INS = 147; -const float K_DEL = 148; -const float K_PGDN = 149; -const float K_PGUP = 150; -const float K_HOME = 151; -const float K_END = 152; - -const float K_NUMLOCK = 154; -const float K_CAPSLOCK = 155; -const float K_SCROLLOCK = 156; - -const float K_KP_0 = 157; -const float K_KP_INS = K_KP_0; -const float K_KP_1 = 158; -const float K_KP_END = K_KP_1; -const float K_KP_2 = 159; -const float K_KP_DOWNARROW = K_KP_2; -const float K_KP_3 = 160; -const float K_KP_PGDN = K_KP_3; -const float K_KP_4 = 161; -const float K_KP_LEFTARROW = K_KP_4; -const float K_KP_5 = 162; -const float K_KP_6 = 163; -const float K_KP_RIGHTARROW = K_KP_6; -const float K_KP_7 = 164; -const float K_KP_HOME = K_KP_7; -const float K_KP_8 = 165; -const float K_KP_UPARROW = K_KP_8; -const float K_KP_9 = 166; -const float K_KP_PGUP = K_KP_9; -const float K_KP_PERIOD = 167; -const float K_KP_DEL = K_KP_PERIOD; -const float K_KP_DIVIDE = 168; -const float K_KP_SLASH = K_KP_DIVIDE; -const float K_KP_MULTIPLY = 169; -const float K_KP_MINUS = 170; -const float K_KP_PLUS = 171; -const float K_KP_ENTER = 172; -const float K_KP_EQUALS = 173; - -const float K_PAUSE = 255; - -// -// joystick buttons -// -const float K_JOY1 = 768; -const float K_JOY2 = 769; -const float K_JOY3 = 770; -const float K_JOY4 = 771; - -// -// aux keys are for multi-buttoned joysticks to generate so they can use -// the normal binding process -// -const float K_AUX1 = 772; -const float K_AUX2 = 773; -const float K_AUX3 = 774; -const float K_AUX4 = 775; -const float K_AUX5 = 776; -const float K_AUX6 = 777; -const float K_AUX7 = 778; -const float K_AUX8 = 779; -const float K_AUX9 = 780; -const float K_AUX10 = 781; -const float K_AUX11 = 782; -const float K_AUX12 = 783; -const float K_AUX13 = 784; -const float K_AUX14 = 785; -const float K_AUX15 = 786; -const float K_AUX16 = 787; -const float K_AUX17 = 788; -const float K_AUX18 = 789; -const float K_AUX19 = 790; -const float K_AUX20 = 791; -const float K_AUX21 = 792; -const float K_AUX22 = 793; -const float K_AUX23 = 794; -const float K_AUX24 = 795; -const float K_AUX25 = 796; -const float K_AUX26 = 797; -const float K_AUX27 = 798; -const float K_AUX28 = 799; -const float K_AUX29 = 800; -const float K_AUX30 = 801; -const float K_AUX31 = 802; -const float K_AUX32 = 803; - -// -// mouse buttons generate virtual keys -// -const float K_MOUSE1 = 512; -const float K_MOUSE2 = 513; -const float K_MOUSE3 = 514; -const float K_MWHEELUP = 515; -const float K_MWHEELDOWN = 516; -const float K_MOUSE4 = 517; -const float K_MOUSE5 = 518; -const float K_MOUSE6 = 519; -const float K_MOUSE7 = 520; -const float K_MOUSE8 = 521; -const float K_MOUSE9 = 522; -const float K_MOUSE10 = 523; -const float K_MOUSE11 = 524; -const float K_MOUSE12 = 525; -const float K_MOUSE13 = 526; -const float K_MOUSE14 = 527; -const float K_MOUSE15 = 528; -const float K_MOUSE16 = 529; - /////////////////////////// // keys pressed const float KEY_FORWARD = 1; @@ -324,6 +161,7 @@ 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; // see DP source, quakedef.h const float STAT_MOVEVARS_AIRSPEEDLIMIT_NONQW = 222; @@ -355,6 +193,9 @@ 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; + // mod stats (1xx) const float STAT_REDALIVE = 100; const float STAT_BLUEALIVE = 101; @@ -534,7 +375,6 @@ float DEATH_TOUCHEXPLODE = 10015; float DEATH_CHEAT = 10016; float DEATH_FIRE = 10017; float DEATH_QUIET = 10021; -float DEATH_HEADSHOT = 10022; float DEATH_VHFIRST = 10030; float DEATH_VHCRUSH = 10030; @@ -575,9 +415,9 @@ float DEATH_TURRET_LAST = 10512; float DEATH_WEAPONMASK = 0xFF; float DEATH_HITTYPEMASK = 0x1F00; // which is WAY below 10000 used for normal deaths float HITTYPE_SECONDARY = 0x100; -float HITTYPE_SPLASH = 0x200; +float HITTYPE_SPLASH = 0x200; // automatically set by RadiusDamage float HITTYPE_BOUNCE = 0x400; -float HITTYPE_HEADSHOT = 0x800; +float HITTYPE_HEADSHOT = 0x800; // automatically set by Damage (if headshotbonus is set) float HITTYPE_RESERVED = 0x1000; // unused yet // macros to access these @@ -625,38 +465,38 @@ float MSG_INFO = 5; float MSG_KA = 6; float MSG_RACE = 10; -float KILL_TEAM_RED = 10301; -float KILL_TEAM_BLUE = 10302; -float KILL_TEAM_SPREE = 10303; -float KILL_FIRST_BLOOD = 10304; -float KILL_FIRST_VICTIM = 10305; -float KILL_TYPEFRAG = 10306; -float KILL_TYPEFRAGGED = 10307; -float KILL_FRAG = 10308; -float KILL_FRAGGED = 10309; -float KILL_SPREE = 10310; -float KILL_END_SPREE = 10311; -float KILL_SPREE_3 = 10312; -float KILL_SPREE_5 = 10313; -float KILL_SPREE_10 = 10314; -float KILL_SPREE_15 = 10315; -float KILL_SPREE_20 = 10316; -float KILL_SPREE_25 = 10317; -float KILL_SPREE_30 = 10318; - -float INFO_GOTFLAG = 10319; -float INFO_PICKUPFLAG = 10320; -float INFO_LOSTFLAG = 10321; -float INFO_RETURNFLAG = 10322; -float INFO_CAPTUREFLAG = 10323; - -float KA_PICKUPBALL = 10350; -float KA_DROPBALL = 10351; - -float RACE_SERVER_RECORD = 10400; -float RACE_NEW_TIME = 10401; -float RACE_NEW_RANK = 10402; -float RACE_FAIL = 10403; +float KILL_TEAM_RED = 12001; +float KILL_TEAM_BLUE = 12002; +float KILL_TEAM_SPREE = 12003; +float KILL_FIRST_BLOOD = 12004; +float KILL_FIRST_VICTIM = 12005; +float KILL_TYPEFRAG = 12006; +float KILL_TYPEFRAGGED = 12007; +float KILL_FRAG = 12008; +float KILL_FRAGGED = 12009; +float KILL_SPREE = 12010; +float KILL_END_SPREE = 12011; +float KILL_SPREE_3 = 12012; +float KILL_SPREE_5 = 12013; +float KILL_SPREE_10 = 12014; +float KILL_SPREE_15 = 12015; +float KILL_SPREE_20 = 12016; +float KILL_SPREE_25 = 12017; +float KILL_SPREE_30 = 12018; + +float INFO_GOTFLAG = 13001; +float INFO_PICKUPFLAG = 13002; +float INFO_LOSTFLAG = 13003; +float INFO_RETURNFLAG = 13004; +float INFO_CAPTUREFLAG = 13005; + +float KA_PICKUPBALL = 14001; +float KA_DROPBALL = 14002; + +float RACE_SERVER_RECORD = 15001; +float RACE_NEW_TIME = 15002; +float RACE_NEW_RANK = 15003; +float RACE_FAIL = 15004; // weapon requests float WR_SETUP = 1; // (SVQC) setup weapon data @@ -711,8 +551,48 @@ string HUD_PANELNAME_INFOMESSAGES = "infomessages"; string HUD_PANELNAME_PHYSICS = "physics"; string HUD_PANELNAME_CENTERPRINT = "centerprint"; -float HUD_MENU_ENABLE = 0; - #define SERVERFLAG_ALLOW_FULLBRIGHT 1 #define SERVERFLAG_TEAMPLAY 2 #define SERVERFLAG_PLAYERSTATS 4 + +var vector autocvar_sv_player_maxs = '16 16 45'; +var vector autocvar_sv_player_mins = '-16 -16 -24'; +var vector autocvar_sv_player_viewoffset = '0 0 20'; +var vector autocvar_sv_player_crouch_maxs = '16 16 25'; +var vector autocvar_sv_player_crouch_mins = '-16 -16 -24'; +var vector autocvar_sv_player_crouch_viewoffset = '0 0 20'; +noref var vector autocvar_sv_player_headsize = '24 24 12'; + +#define PL_VIEW_OFS autocvar_sv_player_viewoffset +#define PL_MIN autocvar_sv_player_mins +#define PL_MAX autocvar_sv_player_maxs +#define PL_CROUCH_VIEW_OFS autocvar_sv_player_crouch_viewoffset +#define PL_CROUCH_MIN autocvar_sv_player_crouch_mins +#define PL_CROUCH_MAX autocvar_sv_player_crouch_maxs +#define PL_HEAD autocvar_sv_player_headsize + +// helpers +#define PL_VIEW_OFS_z autocvar_sv_player_viewoffset_z +#define PL_MIN_z autocvar_sv_player_mins_z +#define PL_MAX_z autocvar_sv_player_maxs_z +#define PL_CROUCH_VIEW_OFS_z autocvar_sv_player_crouch_viewoffset_z +#define PL_CROUCH_MIN_z autocvar_sv_player_mins_z +#define PL_HEAD_x autocvar_sv_player_headsize_x +#define PL_HEAD_y autocvar_sv_player_headsize_y +#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 + +// 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