3 #include <common/constants.qh>
4 #include <common/weapons/_all.qh>
6 // Map coordinate base calculations need these
15 #define ISGAMETYPE(NAME) (gametype == MAPINFO_TYPE_##NAME)
22 void Ent_Remove(entity this);
28 float team_count; // real teams
32 float RegisterPlayer(entity player);
34 void RemovePlayer(entity player);
36 void MoveToLast(entity e);
38 float RegisterTeam(entity Team);
40 void RemoveTeam(entity Team);
42 entity GetTeam(int Team, bool add);
44 bool SetTeam(entity pl, int Team);
48 float RANKINGS_RECEIVED_CNT;
49 float RANKINGS_DISPLAY_CNT;
50 string grecordholder[RANKINGS_CNT];
51 float grecordtime[RANKINGS_CNT];
53 entity playerslots[255]; // 255 is engine limit on maxclients
54 entity teamslots[17]; // 17 teams (including "spectator team")
60 IntrusiveList g_drawables;
61 IntrusiveList g_drawables_2d;
62 IntrusiveList g_radarlinks;
63 IntrusiveList g_radaricons;
66 g_drawables = IL_NEW();
67 g_drawables_2d = IL_NEW();
68 g_radarlinks = IL_NEW();
69 g_radaricons = IL_NEW();
74 .void(entity) entremove;
76 vector view_origin, view_forward, view_right, view_up;
78 .float renderflags; // engine field
81 bool spectatorbutton_zoom;
84 float current_viewzoom;
90 string _getcommandkey(string text, string command, bool forcename);
91 #define getcommandkey(cmd_name, command) _getcommandkey(cmd_name, command, false)
92 #define getcommandkey_forcename(cmd_name, command) _getcommandkey(cmd_name, command, true)
94 string vote_called_vote;
96 bool ready_waiting_for_me;
98 bool vote_waiting_for_me;
100 float current_zoomfraction;
102 int cs_project_is_b0rked;
103 int vid_width, vid_height;
104 float vid_pixelheight;
106 float camera_active; // Demo camera is active if set to true
107 float chase_active_backup;
109 vector camera_direction;
111 const float ALPHA_MIN_VISIBLE = 0.003;
113 float armorblockpercent;
114 float damagepush_speedfactor;
118 const int HOOK_START = 1;
119 const int HOOK_END = 2;
121 .float ping, ping_packetloss, ping_movementloss;
123 float g_trueaim_minrange;
129 const int MAX_SPECTATORS = 7;
130 int spectatorlist[MAX_SPECTATORS];
134 float GetSpeedUnitFactor(int speed_unit);
135 string GetSpeedUnit(int speed_unit);
137 .int enttype; // entity type sent from server
138 .int sv_entnum; // entity number sent from server
148 // >0 - id of spectated player
149 float spectatee_status;
150 float spectatee_status_changed_time;
152 #define player_currententnum (spectatee_status > 0 ? spectatee_status : player_localnum + 1)
157 // database for misc stuff
160 vector hook_shotorigin[4]; // WEAPONTODO
161 vector lightning_shotorigin[4]; // TODO: unused
163 float serverprevtime, serverdeltatime;