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;
22 bool autocvar_cl_welcome = true;
23 bool autocvar_menu_gamemenu = true;
25 // Map coordinate base calculations need these
34 #define ISGAMETYPE(NAME) (gametype == MAPINFO_TYPE_##NAME)
41 void Ent_Remove(entity this);
47 float team_count; // real teams
51 float RegisterPlayer(entity player);
53 void RemovePlayer(entity player);
55 void MoveToLast(entity e);
57 float RegisterTeam(entity Team);
59 void RemoveTeam(entity Team);
61 entity GetTeam(int Team, bool add);
63 bool SetTeam(entity pl, int Team);
67 float RANKINGS_RECEIVED_CNT;
68 float RANKINGS_DISPLAY_CNT;
69 string grecordholder[RANKINGS_CNT];
70 float grecordtime[RANKINGS_CNT];
72 entity playerslots[255]; // 255 is engine limit on maxclients
73 entity teamslots[17]; // 17 teams (including "spectator team")
79 IntrusiveList g_drawables;
80 IntrusiveList g_drawables_2d;
81 IntrusiveList g_radarlinks;
82 IntrusiveList g_radaricons;
85 g_drawables = IL_NEW();
86 g_drawables_2d = IL_NEW();
87 g_radarlinks = IL_NEW();
88 g_radaricons = IL_NEW();
93 .void(entity) entremove;
95 vector view_origin, view_forward, view_right, view_up;
97 .float renderflags; // engine field
100 bool spectatorbutton_zoom;
101 bool observe_blocked;
104 float current_viewzoom;
113 float welcome_msg_menu_check_maxtime;
114 void Welcome_Message_Show_Try();
118 string _getcommandkey(string text, string command, bool forcename);
119 #define getcommandkey(cmd_name, command) _getcommandkey(cmd_name, command, false)
120 #define getcommandkey_forcename(cmd_name, command) _getcommandkey(cmd_name, command, true)
122 void Release_Common_Keys();
124 string vote_called_vote;
126 bool ready_waiting_for_me;
128 bool vote_waiting_for_me;
130 float current_zoomfraction;
132 int vid_width, vid_height;
133 float vid_pixelheight;
135 float camera_active; // Demo camera is active if set to true
136 float chase_active_backup;
138 vector camera_direction;
140 const float ALPHA_MIN_VISIBLE = 0.003;
142 float armorblockpercent;
143 float damagepush_speedfactor;
147 const int HOOK_START = 1;
148 const int HOOK_END = 2;
150 .float ping, ping_packetloss, ping_movementloss;
152 float g_trueaim_minrange;
158 const int MAX_SPECTATORS = 7;
159 int spectatorlist[MAX_SPECTATORS];
163 float GetSpeedUnitFactor(int speed_unit);
164 string GetSpeedUnit(int speed_unit);
166 .int enttype; // entity type sent from server
167 .int sv_entnum; // entity number sent from server
177 // >0 - id of spectated player
178 float spectatee_status;
179 float spectatee_status_changed_time;
181 #define player_currententnum (spectatee_status > 0 ? spectatee_status : player_localnum + 1)
183 // database for misc stuff
186 vector hook_shotorigin[4]; // WEAPONTODO
187 vector lightning_shotorigin[4]; // TODO: unused
189 float serverprevtime, serverdeltatime;