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_damagetext;
88 IntrusiveList g_radarlinks;
89 IntrusiveList g_radaricons;
92 g_drawables = IL_NEW();
93 g_drawables_2d = IL_NEW();
94 g_damagetext = IL_NEW();
95 g_radarlinks = IL_NEW();
96 g_radaricons = IL_NEW();
100 .void(entity) draw2d;
101 .void(entity) entremove;
103 vector view_origin, view_forward, view_right, view_up;
105 .float renderflags; // engine field
108 bool spectatorbutton_zoom;
109 bool observe_blocked;
112 float current_viewzoom;
121 float welcome_msg_menu_check_maxtime;
122 void Welcome_Message_Show_Try();
126 string _getcommandkey(string text, string command, bool forcename);
127 #define getcommandkey(cmd_name, command) _getcommandkey(cmd_name, command, false)
128 #define getcommandkey_forcename(cmd_name, command) _getcommandkey(cmd_name, command, true)
130 void Release_Common_Keys();
132 string vote_called_vote;
134 bool ready_waiting_for_me;
136 bool vote_waiting_for_me;
138 float current_zoomfraction;
140 int vid_width, vid_height;
141 float vid_pixelheight;
143 float camera_active; // Demo camera is active if set to true
144 float chase_active_backup;
146 vector camera_direction;
148 const float ALPHA_MIN_VISIBLE = 0.003;
150 float armorblockpercent;
151 float damagepush_speedfactor;
155 const int HOOK_START = 1;
156 const int HOOK_END = 2;
158 .float ping, ping_packetloss, ping_movementloss;
160 float g_trueaim_minrange;
166 const int MAX_SPECTATORS = 7;
167 int spectatorlist[MAX_SPECTATORS];
171 float GetSpeedUnitFactor(int speed_unit);
172 string GetSpeedUnit(int speed_unit);
174 .int enttype; // entity type sent from server
175 .int sv_entnum; // entity number sent from server
177 // z411 accuracy info
178 .float accuracy_frags[REGISTRY_MAX(Weapons)];
179 .float accuracy_hit[REGISTRY_MAX(Weapons)];
180 .float accuracy_cnt_hit[REGISTRY_MAX(Weapons)];
181 .float accuracy_cnt_fired[REGISTRY_MAX(Weapons)];
193 // >0 - id of spectated player
194 float spectatee_status;
195 float spectatee_status_changed_time;
197 #define player_currententnum (spectatee_status > 0 ? spectatee_status : player_localnum + 1)
199 // database for misc stuff
202 vector hook_shotorigin[4]; // WEAPONTODO
203 vector lightning_shotorigin[4]; // TODO: unused
205 float serverprevtime, serverdeltatime;