3 #include <common/constants.qh>
4 #include <common/weapons/_all.qh>
5 #include <common/items/inventory.qh>
10 int sv_timer_countdown;
12 bool autocvar_cl_db_saveasdump;
13 bool autocvar_cl_spawn_event_particles;
14 bool autocvar_cl_spawn_event_sound = 1;
15 // float autocvar_cl_spawn_point_model;
16 bool autocvar_cl_spawn_point_particles;
17 float autocvar_cl_spawn_point_dist_max = 1200;
18 bool autocvar_cl_unpress_zoom_on_spawn = true;
19 bool autocvar_cl_unpress_zoom_on_death = true;
20 bool autocvar_cl_unpress_zoom_on_weapon_switch = true;
21 bool autocvar_cl_unpress_attack_on_weapon_switch = false;
22 bool autocvar_hud_showbinds;
23 bool autocvar_hud_showbinds_limit;
24 bool autocvar__hud_showbinds_reload;
25 bool autocvar_developer_csqcentities;
26 bool autocvar_cl_race_cptimes_onlyself; // TODO: move to race gamemode
27 bool autocvar_cl_race_cptimes_showself = false;
28 bool autocvar_cl_welcome = true;
29 bool autocvar_menu_gamemenu = true;
31 // Map coordinate base calculations need these
40 #define ISGAMETYPE(NAME) (gametype == MAPINFO_TYPE_##NAME)
47 void Ent_Remove(entity this);
53 float team_count; // real teams
57 float RegisterPlayer(entity player);
59 void RemovePlayer(entity player);
61 void MoveToLast(entity e);
63 float RegisterTeam(entity Team);
65 void RemoveTeam(entity Team);
67 entity GetTeam(int Team, bool add);
69 bool SetTeam(entity pl, int Team);
73 float RANKINGS_RECEIVED_CNT;
74 float RANKINGS_DISPLAY_CNT;
75 string grecordholder[RANKINGS_CNT];
76 float grecordtime[RANKINGS_CNT];
78 entity playerslots[255]; // 255 is engine limit on maxclients
79 entity teamslots[17]; // 17 teams (including "spectator team")
85 IntrusiveList g_drawables;
86 IntrusiveList g_drawables_2d;
87 IntrusiveList g_radarlinks;
88 IntrusiveList g_radaricons;
91 g_drawables = IL_NEW();
92 g_drawables_2d = IL_NEW();
93 g_radarlinks = IL_NEW();
94 g_radaricons = IL_NEW();
99 .void(entity) entremove;
101 vector view_origin, view_forward, view_right, view_up;
103 .float renderflags; // engine field
106 bool spectatorbutton_zoom;
107 bool observe_blocked;
110 float current_viewzoom;
119 float welcome_msg_menu_check_maxtime;
120 void Welcome_Message_Show_Try();
124 string _getcommandkey(string text, string command, bool forcename);
125 #define getcommandkey(cmd_name, command) _getcommandkey(cmd_name, command, false)
126 #define getcommandkey_forcename(cmd_name, command) _getcommandkey(cmd_name, command, true)
128 void Release_Common_Keys();
130 string vote_called_vote;
132 bool ready_waiting_for_me;
134 bool vote_waiting_for_me;
136 float current_zoomfraction;
138 int vid_width, vid_height;
139 float vid_pixelheight;
141 float camera_active; // Demo camera is active if set to true
142 float chase_active_backup;
144 vector camera_direction;
146 const float ALPHA_MIN_VISIBLE = 0.003;
148 float armorblockpercent;
149 float damagepush_speedfactor;
153 const int HOOK_START = 1;
154 const int HOOK_END = 2;
156 .float ping, ping_packetloss, ping_movementloss;
158 float g_trueaim_minrange;
164 const int MAX_SPECTATORS = 7;
165 int spectatorlist[MAX_SPECTATORS];
169 float GetSpeedUnitFactor(int speed_unit);
170 string GetSpeedUnit(int speed_unit);
172 .int enttype; // entity type sent from server
173 .int sv_entnum; // entity number sent from server
175 // z411 accuracy info
176 .float accuracy_frags[REGISTRY_MAX(Weapons)];
177 .float accuracy_hit[REGISTRY_MAX(Weapons)];
178 .float accuracy_cnt_hit[REGISTRY_MAX(Weapons)];
179 .float accuracy_cnt_fired[REGISTRY_MAX(Weapons)];
191 // >0 - id of spectated player
192 float spectatee_status;
193 float spectatee_status_changed_time;
195 #define player_currententnum (spectatee_status > 0 ? spectatee_status : player_localnum + 1)
197 // database for misc stuff
200 vector hook_shotorigin[4]; // WEAPONTODO
201 vector lightning_shotorigin[4]; // TODO: unused
203 float serverprevtime, serverdeltatime;