4 #include <common/constants.qh>
5 #include <common/weapons/all.qh>
7 // --------------------------------------------------------------------------
10 const float DATABUF_PING = 0;
11 #define DATABUF_CAPTURES (1*maxclients)
12 #define DATABUF_DEATHS (2*maxclients)
13 #define DATABUF_RETURNS (3*maxclients)
15 #define DATABUF_NEXT (5*maxclients)
17 void setpredraw(entity this, void(entity) pdfunc);
19 // --------------------------------------------------------------------------
22 // Map coordinate base calculations need these
28 // --------------------------------------------------------------------------
34 //float sorted_players;
43 // --------------------------------------------------------------------------
46 const int MAX_HUD_FIELDS = 16;
48 const int SP_END = -1;
50 const int SP_PING = -2;
51 const int SP_NAME = -3;
52 const int SP_KDRATIO = -4;
53 const int SP_CLRATIO = -5;
55 const int SP_FRAGS = -7;
56 const int SP_SUM = -8;
58 const int SP_SEPARATOR = -100;
60 float hud_field[MAX_HUD_FIELDS + 1];
61 float hud_size[MAX_HUD_FIELDS + 1];
62 string hud_title[MAX_HUD_FIELDS + 1];
65 string scores_label[MAX_SCORE];
66 int scores_flags[MAX_SCORE];
67 string teamscores_label[MAX_SCORE];
68 int teamscores_flags[MAX_SCORE];
69 .int scores[MAX_SCORE];
70 .float teamscores[MAX_TEAMSCORE];
72 #define IS_INCREASING(x) ( (x)&SFL_LOWER_IS_BETTER )
73 #define IS_DECREASING(x) ( !((x)&SFL_LOWER_IS_BETTER) )
78 float RANKINGS_RECEIVED_CNT;
79 string grecordholder[RANKINGS_CNT];
80 float grecordtime[RANKINGS_CNT];
83 entity playerslots[255]; // 255 is engine limit on maxclients
84 entity teamslots[17]; // 17 teams (including "spectator team")
92 .void(entity) entremove;
94 vector view_origin, view_forward, view_right, view_up;
97 bool spectatorbutton_zoom;
101 Weapon switchingweapon;
103 float current_viewzoom;
109 string getcommandkey(string text, string command);
111 string vote_called_vote;
113 float ready_waiting_for_me;
115 float vote_waiting_for_me;
117 float current_zoomfraction;
119 float cs_project_is_b0rked;
120 float vid_width, vid_height, vid_pixelheight;
122 float camera_active; // Demo camera is active if set to true
123 float chase_active_backup;
125 vector camera_direction;
127 void centerprint_hud(string strMessage);
128 void centerprint_kill(float id);
129 void centerprint_generic(float new_id, string strMessage, float duration, float countdown_num);
131 const float ALPHA_MIN_VISIBLE = 0.003;
133 float armorblockpercent;
137 const int HOOK_START = 1;
138 const int HOOK_END = 2;
140 .float ping, ping_packetloss, ping_movementloss;
142 float g_trueaim_minrange;