]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/client/defs.qh
Remove includes from most headers
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / defs.qh
1 #ifndef DEFS_H
2 #define DEFS_H
3
4 //NOTE: THIS IS AN INTERFACE FILE. DO NOT EDIT.
5 //MODIFYING THIS FILE CAN RESULT IN CRC ERRORS.
6 //YOU HAVE BEEN WARNED.
7
8 //feel free to look though. :)
9
10
11
12
13
14 /*
15 ==============================================================================
16
17                         SOURCE FOR GLOBALVARS_T C STRUCTURE
18
19 ==============================================================================
20 */
21
22 //
23 // system globals
24 //
25 //entity                self;
26 //entity                other;
27 //entity                world;
28 //float         time;
29 //float         frametime;
30
31 //int           player_localentnum;     //the entnum of the VIEW entity
32 //int           player_localnum;        //the playernum
33 //float         maxclients;     //a constant filled in by the engine. gah, portability eh?
34
35 //float         clientcommandframe;     //player movement
36 //float         servercommandframe;     //clientframe echoed off the server
37
38 //string                mapname;
39
40 //
41 // global variables set by built in functions
42 //
43 //vector                v_forward, v_up, v_right;       // set by makevectors()
44
45 // set by traceline / tracebox
46 //float         trace_allsolid;
47 //float         trace_startsolid;
48 //float         trace_fraction;
49 //vector                trace_endpos;
50 //vector                trace_plane_normal;
51 //float         trace_plane_dist;
52 //entity                trace_ent;
53 //float         trace_inopen;
54 //float         trace_inwater;
55
56 //
57 // required prog functions
58 //
59 void()          CSQC_Init;
60 void()          CSQC_Shutdown;
61 float(float f, float t, float n)        CSQC_InputEvent;
62 void(float w, float h)          CSQC_UpdateView;
63 bool(string s)  CSQC_ConsoleCommand;
64
65 //these fields are read and set by the default player physics
66 //vector                pmove_org;
67 //vector                pmove_vel;
68 //vector                pmove_mins;
69 //vector                pmove_maxs;
70 //retrieved from the current movement commands (read by player physics)
71 //float         input_timelength;
72 //vector                input_angles;
73 //vector                input_movevalues;       //forwards, right, up.
74 //int                   input_buttons;          //attack, use, jump (default physics only uses jump)
75
76 //float         movevar_gravity;
77 //float         movevar_stopspeed;
78 //float         movevar_maxspeed;
79 //float         movevar_spectatormaxspeed;      //used by NOCLIP movetypes.
80 //float         movevar_accelerate;
81 //float         movevar_airaccelerate;
82 //float         movevar_wateraccelerate;
83 //float         movevar_friction;
84 //float         movevar_waterfriction;
85 //float         movevar_entgravity;     //the local player's gravity field. Is a multiple (1 is the normal value)
86
87 //================================================
88 //void          end_sys_globals;                // flag for structure dumping
89 //================================================
90
91 /*
92 ==============================================================================
93
94                         SOURCE FOR ENTVARS_T C STRUCTURE
95
96 ==============================================================================
97 */
98
99 //
100 // system fields (*** = do not set in prog code, maintained by C code)
101 //
102 .int            modelindex;             // *** model index in the precached list
103 .vector         absmin, absmax; // *** origin + mins / maxs
104
105 .int            entnum; // *** the ent number as on the server
106 .float          drawmask;
107 .void()         predraw;
108
109 .float          movetype;
110 .float          solid;
111
112 .vector         origin;                 // ***
113 .vector         oldorigin;              // ***
114 .vector         velocity;
115 .vector         angles;
116 .vector         avelocity;
117
118 .string         classname;              // spawn function
119 .string         model;
120 .int            frame;
121 .int            skin;
122 .int            effects;
123
124 .vector         mins, maxs;             // bounding box extents reletive to origin
125 .vector         size;                   // maxs - mins
126
127 .void()         touch;
128 .void()         use;
129 .void()         think;
130 .void()         blocked;                // for doors or plats, called when can't push other
131
132 .float          nextthink;
133
134 .entity         chain;
135
136 .string         netname;
137
138 .entity         enemy;
139
140 .int            flags;
141
142 .int            colormap;
143
144 .entity         owner;          // who launched a missile
145
146 //================================================
147 //void          end_sys_fields;                 // flag for structure dumping
148 //================================================
149
150 // Additional OPTIONAL Fields and Globals
151 //float         intermission;
152 float           scoreboard_showscores;
153 float           scoreboard_showaccuracy;
154 .string         message;
155 .int            renderflags;
156 // float                coop;
157 // float                deathmatch;
158
159 float           dmg_take;
160 // float                dmg_save;
161 // vector               dmg_origin;
162
163 // Darkplaces Render Modifications
164 #if 0
165 .float alpha;
166 .float renderflags;
167 .vector colormod;
168 .float scale;
169 #endif
170
171 // Basic variables
172 .float enttype; // entity type sent from server
173 .int   sv_entnum; // entity number sent from server
174 .int team;
175 .int team_size;
176
177 float vid_conwidth, vid_conheight;
178 int binddb;
179
180 // QUALIFYING
181 float race_checkpoint;
182 float race_time;
183 float race_laptime;
184 float race_checkpointtime;
185 float race_previousbesttime;
186 string race_previousbestname;
187 float race_nextcheckpoint;
188 float race_nextbesttime;
189 string race_nextbestname;
190 float race_penaltyaccumulator; // qualifying: total penalty time in tenths
191 float race_penaltyeventtime; // time when the player got the penalty
192 float race_penaltytime; // duration of penalty time, in tenths
193 string race_penaltyreason; // reason for penalty
194 float race_server_record; // server record
195 float race_speedaward;
196 string race_speedaward_holder;
197 float race_speedaward_alltimebest;
198 string race_speedaward_alltimebest_holder;
199
200 // RACE
201 float race_mycheckpoint;
202 float race_mycheckpointtime;
203 float race_mycheckpointdelta;
204 float race_mycheckpointlapsdelta;
205 string race_mycheckpointenemy;
206 float race_othercheckpoint;
207 float race_othercheckpointtime;
208 float race_othercheckpointdelta;
209 float race_othercheckpointlapsdelta;
210 string race_othercheckpointenemy;
211 float scoreboard_showscores_force;
212 float race_status;
213 string race_status_name;
214 float race_myrank;
215
216 // Nexball
217 float nb_pb_period;
218
219 // Spectating
220 float spectatee_status;
221
222 // short mapname
223 string shortmapname;
224
225 // database for misc stuff
226 int tempdb;
227 int ClientProgsDB;
228 vector hook_shotorigin[4];
229 vector lightning_shotorigin[4];
230
231
232 #ifdef BLURTEST
233 float blurtest_time0, blurtest_time1, blurtest_radius, blurtest_power;
234 #endif
235
236 float servertime, serverprevtime, serverdeltatime;
237
238 float ticrate;
239
240 .float damageforcescale;
241 const float MIN_DAMAGEEXTRARADIUS = 2;
242 const float MAX_DAMAGEEXTRARADIUS = 16;
243 .float damageextraradius;
244 .void(float thisdmg, int hittype, vector org, vector thisforce) event_damage;
245
246 // only for Porto
247 float angles_held_status;
248 vector angles_held;
249
250 // weapons
251 .bool silent;
252
253 int w_deathtype;
254 float w_issilent, w_random;
255 vector w_org, w_backoff;
256
257 float rifle_scope;
258 float vortex_scope;
259
260 float minelayer_maxmines;
261
262 float hagar_maxrockets;
263
264 float bgmtime;
265
266 string weaponorder_byimpulse;
267 string weaponorder_bypriority;
268
269 float vortex_charge_movingavg;
270
271 int serverflags;
272
273 float uid2name_dialog;
274
275 .bool csqcmodel_isdead; // used by shownames and miscfunctions (float getplayerisdead(float) {}) to know when a player is dead
276
277 #define player_currententnum (spectatee_status > 0 ? spectatee_status : player_localnum + 1)
278
279 float g_balance_porto_secondary;
280 #endif