]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/defs.qh
Fix #2283 "cl_gunalign fails, weapon always right"
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / defs.qh
index 82c43e2e27a0be796c16d9e008312715d3be540b..5ce4c3e60c3990a1f1492789ca47dee55cdc9bc6 100644 (file)
@@ -1,12 +1,10 @@
-#ifndef DEFS_H
-#define DEFS_H
+#pragma once
 
 // Additional OPTIONAL Fields and Globals
 //float                intermission;
 float          scoreboard_showscores;
-float          scoreboard_showaccuracy;
 .string                message;
-.int           renderflags;
+.float         renderflags;
 // float               coop;
 // float               deathmatch;
 
@@ -17,18 +15,17 @@ float               dmg_take;
 // Darkplaces Render Modifications
 #if 0
 .float alpha;
-.float renderflags;
 .vector colormod;
 .float scale;
 #endif
 
 // Basic variables
-.float enttype; // entity type sent from server
-.int   sv_entnum; // entity number sent from server
+.int enttype; // entity type sent from server
+.int sv_entnum; // entity number sent from server
 .int team;
 .int team_size;
 
-float vid_conwidth, vid_conheight;
+float vid_conheight;
 int binddb;
 
 // QUALIFYING
@@ -37,9 +34,11 @@ float race_time;
 float race_laptime;
 float race_checkpointtime;
 float race_previousbesttime;
+float race_mypreviousbesttime;
 string race_previousbestname;
 float race_nextcheckpoint;
 float race_nextbesttime;
+float race_mybesttime;
 string race_nextbestname;
 float race_penaltyaccumulator; // qualifying: total penalty time in tenths
 float race_penaltyeventtime; // time when the player got the penalty
@@ -48,8 +47,10 @@ string race_penaltyreason; // reason for penalty
 float race_server_record; // server record
 float race_speedaward;
 string race_speedaward_holder;
+string race_speedaward_unit;
 float race_speedaward_alltimebest;
 string race_speedaward_alltimebest_holder;
+string race_speedaward_alltimebest_unit;
 
 // RACE
 float race_mycheckpoint;
@@ -71,7 +72,11 @@ float race_myrank;
 float nb_pb_period;
 
 // Spectating
+// -1 - observing
+// 0 - playing
+// >0 - id of spectated player
 float spectatee_status;
+float spectatee_status_changed_time;
 
 // short mapname
 string shortmapname;
@@ -87,7 +92,7 @@ vector lightning_shotorigin[4];
 float blurtest_time0, blurtest_time1, blurtest_radius, blurtest_power;
 #endif
 
-float servertime, serverprevtime, serverdeltatime;
+float serverprevtime, serverdeltatime;
 
 float ticrate;
 
@@ -95,11 +100,7 @@ float ticrate;
 const float MIN_DAMAGEEXTRARADIUS = 2;
 const float MAX_DAMAGEEXTRARADIUS = 16;
 .float damageextraradius;
-.void(float thisdmg, int hittype, vector org, vector thisforce) event_damage;
-
-// only for Porto
-float angles_held_status;
-vector angles_held;
+.void(entity this, float thisdmg, int hittype, vector org, vector thisforce) event_damage;
 
 // weapons
 .bool silent;
@@ -108,12 +109,67 @@ int w_deathtype;
 float w_issilent, w_random;
 vector w_org, w_backoff;
 
-float rifle_scope;
-float vortex_scope;
-
-float minelayer_maxmines;
-
-float hagar_maxrockets;
+float autoswitch;
+bool cvar_cl_allow_uid2name;
+bool cvar_cl_allow_uidranking;
+float cvar_cl_autoscreenshot;
+float cvar_cl_autotaunt;
+float cvar_cl_clippedspectating;
+int cvar_cl_gunalign;
+float cvar_cl_handicap;
+float cvar_cl_jetpack_jump;
+float cvar_cl_movement_track_canjump;
+float cvar_cl_noantilag;
+string cvar_cl_physics;
+float cvar_cl_voice_directional;
+float cvar_cl_voice_directional_taunt_attenuation;
+float cvar_cl_weaponimpulsemode;
+string cvar_g_xonoticversion;
+float cvar_cl_cts_noautoswitch;
+bool cvar_cl_weapon_switch_reload;
+bool cvar_cl_weapon_switch_fallback_to_impulse;
+
+REPLICATE(autoswitch, bool, "cl_autoswitch");
+REPLICATE(cvar_cl_allow_uid2name, bool, "cl_allow_uid2name");
+REPLICATE(cvar_cl_allow_uidranking, bool, "cl_allow_uidranking");
+REPLICATE(cvar_cl_autoscreenshot, int, "cl_autoscreenshot");
+REPLICATE(cvar_cl_autotaunt, float, "cl_autotaunt");
+REPLICATE(cvar_cl_clippedspectating, bool, "cl_clippedspectating");
+REPLICATE(cvar_cl_gunalign, int, "cl_gunalign");
+REPLICATE(cvar_cl_handicap, float, "cl_handicap");
+REPLICATE(cvar_cl_jetpack_jump, bool, "cl_jetpack_jump");
+REPLICATE(cvar_cl_movement_track_canjump, bool, "cl_movement_track_canjump");
+REPLICATE(cvar_cl_noantilag, bool, "cl_noantilag");
+REPLICATE(cvar_cl_physics, string, "cl_physics");
+REPLICATE(cvar_cl_voice_directional, int, "cl_voice_directional");
+REPLICATE(cvar_cl_voice_directional_taunt_attenuation, float, "cl_voice_directional_taunt_attenuation");
+REPLICATE(cvar_cl_weaponimpulsemode, int, "cl_weaponimpulsemode");
+REPLICATE(cvar_g_xonoticversion, string, "g_xonoticversion");
+REPLICATE(cvar_cl_cts_noautoswitch, bool, "cl_cts_noautoswitch");
+REPLICATE(cvar_cl_weapon_switch_reload, bool, "cl_weapon_switch_reload");
+REPLICATE(cvar_cl_weapon_switch_fallback_to_impulse, bool, "cl_weapon_switch_fallback_to_impulse");
+/*
+// cvar cl_newusekeysupported doesn't exist
+float cvar_cl_newusekeysupported;
+REPLICATE(cvar_cl_newusekeysupported, bool, "cl_newusekeysupported");
+*/
+string cvar_cl_allow_uidtracking;
+REPLICATE(cvar_cl_allow_uidtracking, string, "cl_allow_uidtracking");
+
+string cvar_cl_weaponpriority;
+REPLICATE(cvar_cl_weaponpriority, string, "cl_weaponpriority");
+
+string cvar_cl_weaponpriorities[10];
+REPLICATE(cvar_cl_weaponpriorities[0], string, "cl_weaponpriority0");
+REPLICATE(cvar_cl_weaponpriorities[1], string, "cl_weaponpriority1");
+REPLICATE(cvar_cl_weaponpriorities[2], string, "cl_weaponpriority2");
+REPLICATE(cvar_cl_weaponpriorities[3], string, "cl_weaponpriority3");
+REPLICATE(cvar_cl_weaponpriorities[4], string, "cl_weaponpriority4");
+REPLICATE(cvar_cl_weaponpriorities[5], string, "cl_weaponpriority5");
+REPLICATE(cvar_cl_weaponpriorities[6], string, "cl_weaponpriority6");
+REPLICATE(cvar_cl_weaponpriorities[7], string, "cl_weaponpriority7");
+REPLICATE(cvar_cl_weaponpriorities[8], string, "cl_weaponpriority8");
+REPLICATE(cvar_cl_weaponpriorities[9], string, "cl_weaponpriority9");
 
 float bgmtime;
 
@@ -126,9 +182,8 @@ int serverflags;
 
 float uid2name_dialog;
 
-.bool csqcmodel_isdead; // used by shownames and miscfunctions (float getplayerisdead(float) {}) to know when a player is dead
+float intermission_time;
 
-#define player_currententnum (spectatee_status > 0 ? spectatee_status : player_localnum + 1)
+.bool csqcmodel_isdead; // used by shownames and miscfunctions (entcs_IsDead) to know when a player is dead
 
-float g_balance_porto_secondary;
-#endif
+#define player_currententnum (spectatee_status > 0 ? spectatee_status : player_localnum + 1)