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