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