3 #include <common/constants.qh>
4 #include <common/weapons/_all.qh>
6 bool autocvar_cl_db_saveasdump;
7 bool autocvar_cl_spawn_event_particles;
8 bool autocvar_cl_spawn_event_sound = 1;
9 // float autocvar_cl_spawn_point_model;
10 bool autocvar_cl_spawn_point_particles;
11 float autocvar_cl_spawn_point_dist_max = 1200;
12 bool autocvar_cl_unpress_zoom_on_spawn = true;
13 bool autocvar_cl_unpress_zoom_on_death = true;
14 bool autocvar_cl_unpress_zoom_on_weapon_switch = true;
15 bool autocvar_cl_unpress_attack_on_weapon_switch = false;
16 bool autocvar_hud_showbinds;
17 bool autocvar_hud_showbinds_limit;
18 bool autocvar__hud_showbinds_reload;
19 bool autocvar_developer_csqcentities;
20 bool autocvar_cl_race_cptimes_onlyself; // TODO: move to race gamemode
21 bool autocvar_cl_race_cptimes_showself = false;
23 // Map coordinate base calculations need these
32 #define ISGAMETYPE(NAME) (gametype == MAPINFO_TYPE_##NAME)
39 void Ent_Remove(entity this);
45 float team_count; // real teams
49 float RegisterPlayer(entity player);
51 void RemovePlayer(entity player);
53 void MoveToLast(entity e);
55 float RegisterTeam(entity Team);
57 void RemoveTeam(entity Team);
59 entity GetTeam(int Team, bool add);
61 bool SetTeam(entity pl, int Team);
65 float RANKINGS_RECEIVED_CNT;
66 float RANKINGS_DISPLAY_CNT;
67 string grecordholder[RANKINGS_CNT];
68 float grecordtime[RANKINGS_CNT];
70 entity playerslots[255]; // 255 is engine limit on maxclients
71 entity teamslots[17]; // 17 teams (including "spectator team")
77 IntrusiveList g_drawables;
78 IntrusiveList g_drawables_2d;
79 IntrusiveList g_radarlinks;
80 IntrusiveList g_radaricons;
83 g_drawables = IL_NEW();
84 g_drawables_2d = IL_NEW();
85 g_radarlinks = IL_NEW();
86 g_radaricons = IL_NEW();
91 .void(entity) entremove;
93 vector view_origin, view_forward, view_right, view_up;
95 .float renderflags; // engine field
98 bool spectatorbutton_zoom;
101 float current_viewzoom;
107 string _getcommandkey(string text, string command, bool forcename);
108 #define getcommandkey(cmd_name, command) _getcommandkey(cmd_name, command, false)
109 #define getcommandkey_forcename(cmd_name, command) _getcommandkey(cmd_name, command, true)
111 string vote_called_vote;
113 bool ready_waiting_for_me;
115 bool vote_waiting_for_me;
117 float current_zoomfraction;
119 int cs_project_is_b0rked;
120 int vid_width, vid_height;
121 float vid_pixelheight;
123 float camera_active; // Demo camera is active if set to true
124 float chase_active_backup;
126 vector camera_direction;
128 const float ALPHA_MIN_VISIBLE = 0.003;
130 float armorblockpercent;
131 float damagepush_speedfactor;
135 const int HOOK_START = 1;
136 const int HOOK_END = 2;
138 .float ping, ping_packetloss, ping_movementloss;
140 float g_trueaim_minrange;
146 const int MAX_SPECTATORS = 7;
147 int spectatorlist[MAX_SPECTATORS];
151 float GetSpeedUnitFactor(int speed_unit);
152 string GetSpeedUnit(int speed_unit);
154 .int enttype; // entity type sent from server
155 .int sv_entnum; // entity number sent from server
165 // >0 - id of spectated player
166 float spectatee_status;
167 float spectatee_status_changed_time;
169 #define player_currententnum (spectatee_status > 0 ? spectatee_status : player_localnum + 1)
174 // database for misc stuff
177 vector hook_shotorigin[4]; // WEAPONTODO
178 vector lightning_shotorigin[4]; // TODO: unused
180 float serverprevtime, serverdeltatime;