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;
30 // Map coordinate base calculations need these
39 #define ISGAMETYPE(NAME) (gametype == MAPINFO_TYPE_##NAME)
46 void Ent_Remove(entity this);
52 float team_count; // real teams
56 float RegisterPlayer(entity player);
58 void RemovePlayer(entity player);
60 void MoveToLast(entity e);
62 float RegisterTeam(entity Team);
64 void RemoveTeam(entity Team);
66 entity GetTeam(int Team, bool add);
68 bool SetTeam(entity pl, int Team);
72 float RANKINGS_RECEIVED_CNT;
73 float RANKINGS_DISPLAY_CNT;
74 string grecordholder[RANKINGS_CNT];
75 float grecordtime[RANKINGS_CNT];
77 entity playerslots[255]; // 255 is engine limit on maxclients
78 entity teamslots[17]; // 17 teams (including "spectator team")
84 IntrusiveList g_drawables;
85 IntrusiveList g_drawables_2d;
86 IntrusiveList g_radarlinks;
87 IntrusiveList g_radaricons;
90 g_drawables = IL_NEW();
91 g_drawables_2d = IL_NEW();
92 g_radarlinks = IL_NEW();
93 g_radaricons = IL_NEW();
98 .void(entity) entremove;
100 vector view_origin, view_forward, view_right, view_up;
102 .float renderflags; // engine field
105 bool spectatorbutton_zoom;
108 float current_viewzoom;
114 float welcome_msg_menu_check_maxtime;
115 void Welcome_Message_Show_Try();
119 string _getcommandkey(string text, string command, bool forcename);
120 #define getcommandkey(cmd_name, command) _getcommandkey(cmd_name, command, false)
121 #define getcommandkey_forcename(cmd_name, command) _getcommandkey(cmd_name, command, true)
123 void Release_Common_Keys();
125 string vote_called_vote;
127 bool ready_waiting_for_me;
129 bool vote_waiting_for_me;
131 float current_zoomfraction;
133 int vid_width, vid_height;
134 float vid_pixelheight;
136 float camera_active; // Demo camera is active if set to true
137 float chase_active_backup;
139 vector camera_direction;
141 const float ALPHA_MIN_VISIBLE = 0.003;
143 float armorblockpercent;
144 float damagepush_speedfactor;
148 const int HOOK_START = 1;
149 const int HOOK_END = 2;
151 .float ping, ping_packetloss, ping_movementloss;
153 float g_trueaim_minrange;
159 const int MAX_SPECTATORS = 7;
160 int spectatorlist[MAX_SPECTATORS];
164 float GetSpeedUnitFactor(int speed_unit);
165 string GetSpeedUnit(int speed_unit);
167 .int enttype; // entity type sent from server
168 .int sv_entnum; // entity number sent from server
170 // z411 accuracy info
171 .float accuracy_frags[REGISTRY_MAX(Weapons)];
172 .float accuracy_hit[REGISTRY_MAX(Weapons)];
173 .float accuracy_cnt_hit[REGISTRY_MAX(Weapons)];
174 .float accuracy_cnt_fired[REGISTRY_MAX(Weapons)];
186 // >0 - id of spectated player
187 float spectatee_status;
188 float spectatee_status_changed_time;
190 #define player_currententnum (spectatee_status > 0 ? spectatee_status : player_localnum + 1)
195 // database for misc stuff
198 vector hook_shotorigin[4]; // WEAPONTODO
199 vector lightning_shotorigin[4]; // TODO: unused
201 float serverprevtime, serverdeltatime;