]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/client/main.qh
#include this
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / main.qh
1 #ifndef MAIN_H
2 #define MAIN_H
3
4 #if defined(CSQC)
5     #include "../common/util-pre.qh"
6     #include "sys-pre.qh"
7     #include "../dpdefs/csprogsdefs.qc"
8     #include "sys-post.qh"
9     #include "Defs.qc"
10     #include "../dpdefs/keycodes.qc"
11     #include "../common/constants.qh"
12     #include "../common/stats.qh"
13     #include "../warpzonelib/anglestransform.qh"
14     #include "../warpzonelib/mathlib.qh"
15     #include "../warpzonelib/common.qh"
16     #include "../warpzonelib/client.qh"
17     #include "../common/playerstats.qh"
18     #include "../common/teams.qh"
19     #include "../common/util.qh"
20     #include "../common/nades.qh"
21     #include "../common/buffs.qh"
22     #include "../common/test.qh"
23     #include "../common/counting.qh"
24     #include "../common/weapons/weapons.qh"
25     #include "../common/mapinfo.qh"
26     #include "../common/command/markup.qh"
27     #include "../common/command/rpn.qh"
28     #include "../common/command/generic.qh"
29     #include "../common/command/shared_defs.qh"
30     #include "../common/urllib.qh"
31     #include "../common/animdecide.qh"
32     #include "command/cl_cmd.qh"
33     #include "../common/monsters/monsters.qh"
34     #include "autocvars.qh"
35     #include "../common/notifications.qh"
36     #include "../common/deathtypes.qh"
37     #include "damage.qh"
38     #include "../csqcmodellib/interpolate.qh"
39     #include "teamradar.qh"
40     #include "hud.qh"
41     #include "scoreboard.qh"
42     #include "waypointsprites.qh"
43     #include "movetypes.qh"
44     #include "prandom.qh"
45     #include "bgmscript.qh"
46     #include "noise.qh"
47     #include "tturrets.qh"
48     #include "../server/tturrets/include/turrets_early.qh"
49 #elif defined(MENUQC)
50 #elif defined(SVQC)
51 #endif
52
53 // --------------------------------------------------------------------------
54 // MENU Functionality
55
56 const float DATABUF_PING = 0;
57 #define DATABUF_CAPTURES (1*maxclients)
58 #define DATABUF_DEATHS (2*maxclients)
59 #define DATABUF_RETURNS (3*maxclients)
60
61 #define DATABUF_NEXT (5*maxclients)
62
63 void() menu_show_error;
64 void() menu_sub_null;
65
66 float menu_visible;
67 var void() menu_show;
68 var float(float bInputType, float nPrimary, float nSecondary) menu_action;
69
70 // --------------------------------------------------------------------------
71 // Onslaught
72
73 // Map coordinate base calculations need these
74 vector mi_center;
75 vector mi_scale;
76 // Minimap
77 string minimapname;
78
79 // --------------------------------------------------------------------------
80 // General stuff
81
82 float postinit;
83 float gametype;
84
85 //float sorted_players;
86 //float sorted_teams;
87
88 // Defs
89 //.float ctf_state;
90 //.float health;
91
92 float FONT_USER = 8;
93
94 // --------------------------------------------------------------------------
95 // Scoreboard stuff
96
97 const int MAX_HUD_FIELDS = 16;
98
99 const int SP_END = -1;
100
101 const int SP_PING = -2;
102 const int SP_NAME = -3;
103 const int SP_KDRATIO = -4;
104 const int SP_CLRATIO = -5;
105 const int SP_PL = -6;
106 const int SP_FRAGS = -7;
107 const int SP_SUM = -8;
108
109 const int SP_SEPARATOR = -100;
110
111 float hud_field[MAX_HUD_FIELDS + 1];
112 float hud_size[MAX_HUD_FIELDS + 1];
113 string hud_title[MAX_HUD_FIELDS + 1];
114 int hud_num_fields;
115
116 string scores_label[MAX_SCORE];
117 int scores_flags[MAX_SCORE];
118 string teamscores_label[MAX_SCORE];
119 int teamscores_flags[MAX_SCORE];
120 .int scores[MAX_SCORE];
121 .float teamscores[MAX_TEAMSCORE];
122
123 #define IS_INCREASING(x) ( (x)&SFL_LOWER_IS_BETTER )
124 #define IS_DECREASING(x) ( !((x)&SFL_LOWER_IS_BETTER) )
125
126
127 vector hud_fontsize;
128
129 float RANKINGS_RECEIVED_CNT;
130 string grecordholder[RANKINGS_CNT];
131 float grecordtime[RANKINGS_CNT];
132 //float csqc_flags;
133
134 entity playerslots[255]; // 255 is engine limit on maxclients
135 entity teamslots[17];    // 17 teams (including "spectator team")
136 .float gotscores;
137 .entity owner;
138 .float ready;
139 .float eliminated;
140
141 .void(void) draw;
142 .void(void) draw2d;
143 .void(void) entremove;
144 float drawframetime;
145 vector view_origin, view_forward, view_right, view_up;
146
147 float button_zoom;
148 float spectatorbutton_zoom;
149 float button_attack2;
150
151 float activeweapon;
152 float switchingweapon;
153 float switchweapon;
154 float current_viewzoom;
155 float zoomin_effect;
156 float warmup_stage;
157
158 string getcommandkey(string text, string command);
159
160 string vote_called_vote;
161 float ready_waiting;
162 float ready_waiting_for_me;
163 float vote_waiting;
164 float vote_waiting_for_me;
165
166 float current_zoomfraction;
167
168 float cs_project_is_b0rked;
169 float vid_width, vid_height, vid_pixelheight;
170
171 float camera_active;            // Demo camera is active if set to true
172 float chase_active_backup;
173 float camera_roll;
174 vector camera_direction;
175
176 void centerprint_hud(string strMessage);
177 void centerprint_generic(float new_id, string strMessage, float duration, float countdown_num);
178
179 const float ALPHA_MIN_VISIBLE = 0.003;
180
181 float armorblockpercent;
182
183 //hooks
184 int calledhooks;
185 const int HOOK_START =    1;
186 const int HOOK_END =      2;
187
188 .float ping, ping_packetloss, ping_movementloss;
189
190 float g_balance_mortar_bouncefactor;
191 float g_balance_mortar_bouncestop;
192 float g_balance_electro_secondary_bouncefactor;
193 float g_balance_electro_secondary_bouncestop;
194 float g_trueaim_minrange;
195
196 entity entcs_receiver[255]; // 255 is the engine limit on maxclients
197
198 float hud;
199 float view_quality;
200 int framecount;
201 #endif