DarkPlaces
Game engine based on the Quake 1 engine by id Software, developed by LadyHavoc
 
csprogsdefs.qc
Go to the documentation of this file.
1/*
2==============================================================================
3
4 SOURCE FOR GLOBALVARS_T C STRUCTURE
5 MUST NOT BE MODIFIED, OR CRC ERRORS WILL APPEAR
6
7==============================================================================
8*/
9
10//
11// system globals
12//
16float time;
18
19float player_localentnum; //the entnum
20float player_localnum; //the playernum
21float maxclients; //a constant filled in by the engine. gah, portability eh?
22
23float clientcommandframe; //player movement
24float servercommandframe; //clientframe echoed off the server
25
26string mapname;
27
28//
29// global variables set by built in functions
30//
31vector v_forward, v_up, v_right; // set by makevectors()
32
33// set by traceline / tracebox
43
44//
45// prog functions called by engine
46//
47void CSQC_Init(float apilevel, string enginename, float engineversion);
49float CSQC_InputEvent(float evtype, float scanx, float chary);
50void CSQC_UpdateView(float vid_width, float vid_height, float notmenu); // required for EXT_CSQC (preferred)
51float CSQC_ConsoleCommand(string cmdstr);
52#ifdef CSQC_SIMPLE // hud-only CSQC
53 void CSQC_DrawHud(vector virtsize, float showscores); // required for CSQC_SIMPLE (fallback)
54 void CSQC_DrawScores(vector virtsize, float showscores);
55#endif
56
57//these fields are read and set by the default player physics
62//retrieved from the current movement commands (read by player physics)
65vector input_movevalues; //forwards, right, up.
66float input_buttons; //attack, use, jump (default physics only uses jump)
67
71float movevar_spectatormaxspeed; //used by NOCLIP movetypes.
77float movevar_entgravity; //the local player's gravity field. Is a multiple (1 is the normal value)
78
79//================================================
80void end_sys_globals; // flag for structure dumping
81//================================================
82
83/*
84==============================================================================
85
86 SOURCE FOR ENTVARS_T C STRUCTURE
87 MUST NOT BE MODIFIED, OR CRC ERRORS WILL APPEAR
88
89==============================================================================
90*/
91
92//
93// system fields (*** = do not set in prog code, maintained by C code)
94//
95.float modelindex; // *** model index in the precached list
96.vector absmin, absmax; // *** origin + mins / maxs
97
98.float entnum; // *** the ent number as on the server
99.float drawmask;
100.void() predraw;
101
102.float movetype;
103.float solid;
104
105.vector origin; // ***
106.vector oldorigin; // ***
107.vector velocity;
108.vector angles;
109.vector avelocity;
110
111.string classname; // spawn function
112.string model;
113.float frame;
114.float skin;
115.float effects;
116
117.vector mins, maxs; // bounding box extents reletive to origin
118.vector size; // maxs - mins
119
120.void() touch;
121.void() use;
122.void() think;
123.void() blocked; // for doors or plats, called when can't push other
124
126
127.entity chain;
128
129.string netname;
130
131.entity enemy;
132
133.float flags;
134
135.float colormap;
136
137.entity owner; // who launched a missile
138
139//================================================
140void end_sys_fields; // flag for structure dumping
141//================================================
142
143/*
144==============================================================================
145
146 OPTIONAL FIELDS AND GLOBALS
147
148==============================================================================
149*/
150
151// Additional OPTIONAL Fields and Globals
152float intermission; // indicates intermission state (0 = normal, 1 = scores, 2 = finale text)
153
154vector view_angles; // same as input_angles
155vector view_punchangle; // from server
157
158/*
159==============================================================================
160
161 CONSTANT DEFINITIONS
162
163==============================================================================
164*/
165
166const float MASK_ENGINE = 1;
167const float MASK_ENGINEVIEWMODELS = 2;
168const float MASK_NORMAL = 4;
169
170const float RF_VIEWMODEL = 1;
171const float RF_EXTERNALMODEL = 2;
172const float RF_DEPTHHACK = 4;
173const float RF_ADDITIVE = 8;
174const float RF_USEAXIS = 16;
175
176const float VF_MIN = 1; //(vector)
177const float VF_MIN_X = 2; //(float)
178const float VF_MIN_Y = 3; //(float)
179const float VF_SIZE = 4; //(vector) (viewport size)
180const float VF_SIZE_Y = 5; //(float)
181const float VF_SIZE_X = 6; //(float)
182const float VF_VIEWPORT = 7; //(vector, vector)
183const float VF_FOV = 8; //(vector)
184const float VF_FOVX = 9; //(float)
185const float VF_FOVY = 10; //(float)
186const float VF_ORIGIN = 11; //(vector)
187const float VF_ORIGIN_X = 12; //(float)
188const float VF_ORIGIN_Y = 13; //(float)
189const float VF_ORIGIN_Z = 14; //(float)
190const float VF_ANGLES = 15; //(vector)
191const float VF_ANGLES_X = 16; //(float)
192const float VF_ANGLES_Y = 17; //(float)
193const float VF_ANGLES_Z = 18; //(float)
194const float VF_DRAWWORLD = 19; //(float)
195const float VF_DRAWENGINESBAR = 20; //(float)
196const float VF_DRAWCROSSHAIR = 21; //(float)
197
198const float VF_CL_VIEWANGLES = 33; //(vector)
199const float VF_CL_VIEWANGLES_X = 34; //(float)
200const float VF_CL_VIEWANGLES_Y = 35; //(float)
201const float VF_CL_VIEWANGLES_Z = 36; //(float)
202
203const float VF_PERSPECTIVE = 200;
204
205const float STAT_HEALTH = 0;
206const float STAT_WEAPONMODEL = 2;
207const float STAT_AMMO = 3;
208const float STAT_ARMOR = 4;
209const float STAT_WEAPONFRAME = 5;
210const float STAT_SHELLS = 6;
211const float STAT_NAILS = 7;
212const float STAT_ROCKETS = 8;
213const float STAT_CELLS = 9;
214const float STAT_ACTIVEWEAPON = 10;
215const float STAT_TOTALSECRETS = 11;
216const float STAT_TOTALMONSTERS = 12;
217const float STAT_SECRETS = 13;
218const float STAT_MONSTERS = 14;
219const float STAT_ITEMS = 15;
220const float STAT_VIEWHEIGHT = 16;
221
222// Quake Sound Constants
223const float CHAN_AUTO = 0;
224const float CHAN_WEAPON = 1;
225const float CHAN_VOICE = 2;
226const float CHAN_ITEM = 3;
227const float CHAN_BODY = 4;
228
229const float ATTN_NONE = 0;
230const float ATTN_NORM = 1;
231const float ATTN_IDLE = 2;
232const float ATTN_STATIC = 3;
233
234// Frik File Constants
235const float FILE_READ = 0;
236const float FILE_APPEND = 1;
237const float FILE_WRITE = 2;
238
239// Quake Point Contents
240const float CONTENT_EMPTY = -1;
241const float CONTENT_SOLID = -2;
242const float CONTENT_WATER = -3;
243const float CONTENT_SLIME = -4;
244const float CONTENT_LAVA = -5;
245const float CONTENT_SKY = -6;
246
247// Quake Solid Constants
248const float SOLID_NOT = 0;
249const float SOLID_TRIGGER = 1;
250const float SOLID_BBOX = 2;
251const float SOLID_SLIDEBOX = 3;
252const float SOLID_BSP = 4;
253const float SOLID_CORPSE = 5;
254
255// Quake Move Constants
256const float MOVE_NORMAL = 0;
257const float MOVE_NOMONSTERS = 1;
258const float MOVE_MISSILE = 2;
259
260// Boolean Constants
261const float true = 1;
262const float false = 0;
263const float TRUE = 1;
264const float FALSE = 0;
265
266const float EXTRA_LOW = -99999999;
267const float EXTRA_HIGH = 99999999;
268
269const vector VEC_1 = '1 1 1';
270const vector VEC_0 = '0 0 0';
271const vector VEC_M1 = '-1 -1 -1';
272
273const float M_PI = 3.14159265358979323846;
274
275vector VEC_HULL_MIN = '-16 -16 -24';
276vector VEC_HULL_MAX = '16 16 32';
277
278// Quake Temporary Entity Constants
279const float TE_SPIKE = 0;
280const float TE_SUPERSPIKE = 1;
281const float TE_GUNSHOT = 2;
282const float TE_EXPLOSION = 3;
283const float TE_TAREXPLOSION = 4;
284const float TE_LIGHTNING1 = 5;
285const float TE_LIGHTNING2 = 6;
286const float TE_WIZSPIKE = 7;
287const float TE_KNIGHTSPIKE = 8;
288const float TE_LIGHTNING3 = 9;
289const float TE_LAVASPLASH = 10;
290const float TE_TELEPORT = 11;
291const float TE_EXPLOSION2 = 12;
292 // Darkplaces Additions
293 const float TE_EXPLOSIONRGB = 53;
294 const float TE_GUNSHOTQUAD = 57;
295 const float TE_EXPLOSIONQUAD = 70;
296 const float TE_SPIKEQUAD = 58;
297 const float TE_SUPERSPIKEQUAD = 59;
298
299// PFlags for Dynamic Lights
300const float PFLAGS_NOSHADOW = 1;
301const float PFLAGS_CORONA = 2;
302const float PFLAGS_FULLDYNAMIC = 128;
303
304const float EF_ADDITIVE = 32;
305const float EF_BLUE = 64;
306const float EF_FLAME = 1024;
307const float EF_FULLBRIGHT = 512;
308const float EF_NODEPTHTEST = 8192;
309const float EF_NODRAW = 16;
310const float EF_NOSHADOW = 4096;
311const float EF_RED = 128;
312const float EF_STARDUST = 2048;
313const float EF_SELECTABLE = 16384;
314
315const float PFL_ONGROUND = 1;
316const float PFL_CROUCH = 2;
317const float PFL_DEAD = 4;
318const float PFL_GIBBED = 8;
319
320// draw flags
321const float DRAWFLAG_NORMAL = 0;
322const float DRAWFLAG_ADDITIVE = 1;
323const float DRAWFLAG_MODULATE = 2;
324const float DRAWFLAG_2XMODULATE = 3;
325const float DRAWFLAG_SCREEN = 4;
326const float DRAWFLAG_MIPMAP = 0x100; // only for R_BeginPolygon
327
328/*
329==============================================================================
330
331 BUILTIN DEFINITIONS
332 EXTENSIONS ARE NOT ADDED HERE, BUT BELOW!
333
334==============================================================================
335*/
336
337void(vector ang) makevectors = #1;
338void(entity e, vector o) setorigin = #2;
339void(entity e, string m) setmodel = #3;
340void(entity e, vector min, vector max) setsize = #4;
341
342void() break_to_debugger = #6;
343float() random = #7; // Returns a random number > 0 and < 1
344void(entity e, float chan, string samp, float volume, float atten, ...) sound = #8;
346void(string e) error = #10;
347void(string e) objerror = #11;
349float(vector v) vectoyaw = #13;
350entity() spawn = #14;
352float(vector v1, vector v2, float tryents, entity ignoreentity) traceline = #16;
353
354entity(entity start, .string fld, string match) find = #18;
355void(string s) precache_sound = #19;
356void(string s) precache_model = #20;
357
358entity(vector org, float rad) findradius = #22;
359
360void(string s, ...) dprint = #25;
361string(float f) ftos = #26;
363void() coredump = #28;
364void() traceon = #29;
365void() traceoff = #30;
366void(entity e) eprint = #31;
367// settrace optional
368float(float yaw, float dist, float settrace) walkmove = #32;
369
370float() droptofloor = #34;
371void(float style, string value) lightstyle = #35;
372float(float v) rint = #36;
373float(float v) floor = #37;
374float(float v) ceil = #38;
375
376float(entity e) checkbottom = #40;
377float(vector v) pointcontents = #41;
378
379float(float f) fabs = #43;
380
381float(string s) cvar = #45;
382void(string s, ...) localcmd = #46;
384void(vector o, vector d, float color, float count) particle = #48;
385void() ChangeYaw = #49;
386
388vector(vector v, vector w) vectoangles2 = #51;
389
390float(float f) sin = #60;
391float(float f) cos = #61;
392float(float f) sqrt = #62;
393void(entity ent) changepitch = #63;
394void(entity e, entity ignore) tracetoss = #64;
395string(entity ent) etos = #65;
396
397string(string s) precache_file = #68;
398void(entity e) makestatic = #69;
399
400void(string var, string val) cvar_set = #72;
401
402void(vector pos, string samp, float vol, float atten) ambientsound = #74;
403string(string s) precache_model2 = #75;
404string(string s) precache_sound2 = #76;
405string(string s) precache_file2 = #77;
406
407float(string s) stof = #81;
408
409
410void(vector v1, vector min, vector max, vector v2, float nomonsters, entity forent) tracebox = #90;
412vector(vector org) getlight = #92;
413vector(vector org, float lpflags) getlight2 = #92;
417const float LP_LIGHTMAP = 1;
418const float LP_RTWORLD = 2;
419const float LP_DYNLIGHT = 4;
420const float LP_COMPLETE = 7;
421
422float(string name, string value) registercvar = #93;
423float( float a, ... ) min = #94;
424float( float b, ... ) max = #95;
425float(float minimum, float val, float maximum) bound = #96;
426float(float f, float f) pow = #97;
427entity(entity start, .float fld, float match) findfloat = #98;
428entity(entity start, .entity fld, entity match) findentity = #98;
429float(string s) checkextension = #99;
430// FrikaC and Telejano range #100-#199
431
432float(string filename, float mode) fopen = #110;
433void(float fhandle) fclose = #111;
434string(float fhandle) fgets = #112;
435void(float fhandle, string s) fputs = #113;
436float(string s) strlen = #114;
437string(string s, string...) strcat = #115;
438string(string s, float start, float length) substring = #116;
439vector(string) stov = #117;
440string(string s) strzone = #118;
441void(string s) strunzone = #119;
442void(string s, float chan, float vol) localsound = #177;
443
444// FTEQW range #200-#299
445
446float(float number, float quantity) bitshift = #218;
447
448//float(string str, string sub[, float startpos]) strstrofs = #221;
449float(string str, string sub, float startpos) strstrofs = #221;
450float(string str, float ofs) str2chr = #222;
451string(float c, ...) chr2str = #223;
452string(float ccase, float calpha, float cnum, string s, ...) strconv = #224;
453string(float chars, string s, ...) strpad = #225;
454string(string info, string key, string value, ...) infoadd = #226;
455string(string info, string key) infoget = #227;
456float(string s1, string s2) strcmp = #228;
457float(string s1, string s2, float len) strncmp = #228;
458float(string s1, string s2) strcasecmp = #229;
459float(string s1, string s2, float len) strncasecmp = #230;
460
461// CSQC range #300-#399
462void() clearscene = #300;
463void(float mask) addentities = #301;
464void(entity ent) addentity = #302;
465float(float property, ...) setproperty = #303;
466float(float property) getproperty = #309;
467vector(float property) getpropertyvec = #309;
468void() renderscene = #304;
469void(vector org, float radius, vector lightcolours) adddynamiclight = #305;
470void(vector org, float radius, vector lightcolours, float style, string cubemapname, float pflags) adddynamiclight2 = #305;
471//void(string texturename, float flag[, float is2d, float lines]) R_BeginPolygon = #306;
472void(string texturename, float flag, ...) R_BeginPolygon = #306;
473void(vector org, vector texcoords, vector rgb, float alpha) R_PolygonVertex = #307;
474void() R_EndPolygon = #308;
475vector (vector v) cs_unproject = #310;
476vector (vector v) cs_project = #311;
477
478void(float width, vector pos1, vector pos2, vector rgb, float alpha, float flag) drawline = #315;
479float(string name) iscachedpic = #316;
480string(string name, ...) precache_pic = #317;
481string(string name) precache_cubemap = #317;
482vector(string picname) draw_getimagesize = #318;
483void(string name) freepic = #319;
484float(vector position, float character, vector scale, vector rgb, float alpha, float flag) drawcharacter = #320;
485float(vector position, string text, vector scale, vector rgb, float alpha, float flag) drawstring = #321;
486float(vector position, string pic, vector size, vector rgb, float alpha, float flag) drawpic = #322;
487float(vector position, vector size, vector rgb, float alpha, float flag) drawfill = #323;
488void(float x, float y, float width, float height) drawsetcliparea = #324;
489void(void) drawresetcliparea = #325;
490float(vector position, string text, vector scale, float alpha, float flag) drawcolorcodedstring = #326;
491vector(vector position, string text, vector scale, vector rgb, float alpha, float flag) drawcolorcodedstring2 = #326;
492
493float(float stnum) getstatf = #330;
494float(float stnum, ...) getstati = #331; // can optionally take first bit and count
495string(float firststnum) getstats = #332;
496void(entity e, float mdlindex) setmodelindex = #333;
497string(float mdlindex) modelnameforindex = #334;
498float(string effectname) particleeffectnum = #335;
499void(entity ent, float effectnum, vector start, vector end) trailparticles = #336;
500//void(float effectnum, vector origin [, vector dir, float count]) pointparticles = #337;
501void(float effectnum, vector origin , vector dir, float count) pointparticles = #337;
502void(string s, ...) centerprint = #338;
503void(string s, ...) print = #339;
504string(float keynum) keynumtostring = #340;
505float(string keyname) stringtokeynum = #341;
506string(float keynum) getkeybind = #342;
507void(float usecursor) setcursormode = #343;
508vector() getmousepos = #344;
509float(float framenum) getinputstate = #345;
510void(float sens) setsensitivityscale = #346;
511void(...) runstandardplayerphysics = #347; // this may or may not take a player ent
512string(float playernum, string keyname) getplayerkeyvalue = #348;
513float() isdemo = #349;
514float() isserver = #350;
516void(string cmdname) registercommand = #352;
517float(entity ent) wasfreed = #353;
518string(string key) serverkey = #354;
519
520// Use proper case; refer to the id1 Write* functions!
521float() ReadByte = #360;
522float() ReadChar = #361;
523float() ReadShort = #362;
524float() ReadLong = #363;
525float() ReadCoord = #364;
526float() ReadAngle = #365;
527string() ReadString = #366;
528float() ReadFloat = #367;
529
530// LadyHavoc's range #400-#499
531void(entity from, entity to) copyentity = #400;
532
533entity(.string fld, string match) findchain = #402;
534entity(.float fld, float match) findchainfloat = #403;
535void(vector org, string modelname, float startframe, float endframe, float framerate) effect = #404;
536void(vector org, vector velocity, float howmany) te_blood = #405;
537void(vector mincorner, vector maxcorner, float explosionspeed, float howmany) te_bloodshower = #406;
538void(vector org, vector color) te_explosionrgb = #407;
539void(vector mincorner, vector maxcorner, vector vel, float howmany, float color, float gravityflag, float randomveljitter) te_particlecube = #408;
540void(vector mincorner, vector maxcorner, vector vel, float howmany, float color) te_particlerain = #409;
541void(vector mincorner, vector maxcorner, vector vel, float howmany, float color) te_particlesnow = #410;
542void(vector org, vector vel, float howmany) te_spark = #411;
543void(vector org) te_gunshotquad = #412;
544void(vector org) te_spikequad = #413;
545void(vector org) te_superspikequad = #414;
546void(vector org) te_explosionquad = #415;
547void(vector org) te_smallflash = #416;
548void(vector org, float radius, float lifetime, vector color) te_customflash = #417;
549void(vector org) te_gunshot = #418;
550void(vector org) te_spike = #419;
551void(vector org) te_superspike = #420;
552void(vector org) te_explosion = #421;
553void(vector org) te_tarexplosion = #422;
554void(vector org) te_wizspike = #423;
555void(vector org) te_knightspike = #424;
556void(vector org) te_lavasplash = #425;
557void(vector org) te_teleport = #426;
558void(vector org, float colorstart, float colorlength) te_explosion2 = #427;
559void(entity own, vector start, vector end) te_lightning1 = #428;
560void(entity own, vector start, vector end) te_lightning2 = #429;
561void(entity own, vector start, vector end) te_lightning3 = #430;
562void(entity own, vector start, vector end) te_beam = #431;
563void(vector dir) vectorvectors = #432;
564void(vector org) te_plasmaburn = #433;
565float(entity e, float s) getsurfacenumpoints = #434;
566vector(entity e, float s, float n) getsurfacepoint = #435;
567vector(entity e, float s) getsurfacenormal = #436;
568string(entity e, float s) getsurfacetexture = #437;
569float(entity e, vector p) getsurfacenearpoint = #438;
570vector(entity e, float s, vector p) getsurfaceclippedpoint = #439;
571
572float(string s) tokenize = #441;
573string(float n) argv = #442;
574void(entity e, entity tagentity, string tagname) setattachment = #443;
575float(string pattern, float caseinsensitive, float quiet) search_begin = #444;
576void(float handle) search_end = #445;
577float(float handle) search_getsize = #446;
578string(float handle, float num) search_getfilename = #447;
579string(string s) cvar_string = #448;
580entity(entity start, .float fld, float match) findflags = #449;
581entity(.float fld, float match) findchainflags = #450;
582float(entity ent, string tagname) gettagindex = #451;
583vector(entity ent, float tagindex) gettaginfo = #452;
584
585void(vector org, vector vel, float howmany) te_flamejet = #457;
586
587entity(float num) entitybyindex = #459;
588float() buf_create = #460;
589void(float bufhandle) buf_del = #461;
590float(float bufhandle) buf_getsize = #462;
591void(float bufhandle_from, float bufhandle_to) buf_copy = #463;
592void(float bufhandle, float sortpower, float backward) buf_sort = #464;
593string(float bufhandle, string glue) buf_implode = #465;
594string(float bufhandle, float string_index) bufstr_get = #466;
595void(float bufhandle, float string_index, string str) bufstr_set = #467;
596float(float bufhandle, string str, float order) bufstr_add = #468;
597void(float bufhandle, float string_index) bufstr_free = #469;
598
599float(float s) asin = #471;
600float(float c) acos = #472;
601float(float t) atan = #473;
602float(float c, float s) atan2 = #474;
603float(float a) tan = #475;
604float(string s) strippedstringlen = #476;
605float(string s) strlennocol = #476; // This is the correct name for the function, but not removing the strippedstringlen mapping.
606string(string s) decolorizedstring = #477;
607string(string s) strdecolorize = #477; // This is the correct name for the function, but not removing the decolorizedstring mapping.
608string(float uselocaltime, string format, ...) strftime = #478;
609string(string s) strtolower = #480;
610string(string s) strtoupper = #481;
611string(string s) cvar_defstring = #482;
612void(vector origin, string sample, float volume, float attenuation) pointsound = #483;
613string(string search, string replace, string subject) strreplace = #484;
614string(string search, string replace, string subject) strireplace = #485;
615vector(entity e, float s, float n, float a) getsurfacepointattribute = #486;
616#ifdef SUPPORT_GECKO
617float gecko_create( string name ) = #487;
618void gecko_destroy( string name ) = #488;
619void gecko_navigate( string name, string URI ) = #489;
620float gecko_keyevent( string name, float key, float eventtype ) = #490;
621void gecko_mousemove( string name, float x, float y ) = #491;
622void gecko_resize( string name, float w, float h ) = #492;
623vector gecko_get_texture_extent( string name ) = #493;
624#else
625
626#endif
627
628/*
629==============================================================================
630
631 EXTENSION DEFINITIONS
632
633==============================================================================
634*/
635
636// DP_CSQC_SPAWNPARTICLE
637// idea: VorteX
638// darkplaces implementation: VorteX
639// constant definitions:
640// particle base behavior:
642float PT_STATIC = 2;
643float PT_SPARK = 3;
644float PT_BEAM = 4;
645float PT_RAIN = 5;
646float PT_RAINDECAL = 6;
647float PT_SNOW = 7;
648float PT_BUBBLE = 8;
649float PT_BLOOD = 9;
650float PT_SMOKE = 10;
651float PT_DECAL = 11;
653// particle blendtypes:
654float PBLEND_ALPHA = 0;
655float PBLEND_ADD = 1;
657// particle orientation:
662// global definitions:
663float particle_type; // one of PT_
664float particle_blendmode; // one of PBLEND_ values
665float particle_orientation; // one of PARTICLE_ values
668float particle_tex; // number of chunk in particlefont
680float particle_qualityreduction; // enable culling of this particle when FPS is low
691// builtin definitions:
692float(float max_themes) initparticlespawner = #522; // check fields/globals for integration and enable particle spawner, return 1 is succeded, otherwise returns 0
693void() resetparticle = #523; // reset p_ globals to default theme #0
694void(float theme) particletheme = #524; // restore p_ globals from saved theme
695float() particlethemesave = #525; // save p_ globals to new particletheme and return it's index
696void(float theme) particlethemeupdate = #525; // save p_ globals to new particletheme and return it's index
697void(float theme) particlethemefree = #526; // delete a particle theme
698float(vector org, vector vel) spawnparticle = #527; // returns 0 when failed, 1 when spawned
699float(vector org, vector vel, float theme) quickparticle = #527; // not reading globals, just theme, returns 0 when failed, 1 when spawned
700float(vector org, vector vel, float delay, float collisiondelay) delayedparticle = #528;
701float(vector org, vector vel, float delay, float collisiondelay, float theme) quickdelayedparticle = #528;
702// description: this builtin provides an easy and flexible way to spawn particles,
703// it is not created as replace for DP_SV_POINTPARTICLES but as an addition to it.
704// With this extension you can create a specific particles like rain particles, or entity particles
705// notes:
706// 1) 0 is default particle template, it could be changed
707// 2) color vectors could have value 0-255 of each component
708// restrictions: max themes could be between 4 and 2048
709// warning: you should call initparticlespawner() at very beginning BEFORE all other particle spawner functions
710// function to query particle info
711// don't remove this function as it protects all particle_ globals from FTEQCC/FRIKQCC non-referenced removal optimisation
712void() printparticle =
713{
714 // vortex: this also protects from 'non-referenced' optimisation on some compilers
715 print("PARTICLE:\n");
716 print(strcat(" type: ", ftos(particle_type), "\n"));
717 print(strcat(" blendmode: ", ftos(particle_blendmode), "\n"));
718 print(strcat(" orientation: ", ftos(particle_orientation), "\n"));
719 print(strcat(" color1: ", vtos(particle_color1), "\n"));
720 print(strcat(" color2: ", vtos(particle_color2), "\n"));
721 print(strcat(" tex: ", ftos(particle_tex), "\n"));
722 print(strcat(" size: ", ftos(particle_size), "\n"));
723 print(strcat(" sizeincrease: ", ftos(particle_sizeincrease), "\n"));
724 print(strcat(" alpha: ", ftos(particle_alpha), "\n"));
725 print(strcat(" alphafade: ", ftos(particle_alphafade), "\n"));
726 print(strcat(" time: ", ftos(particle_time), "\n"));
727 print(strcat(" gravity: ", ftos(particle_gravity), "\n"));
728 print(strcat(" bounce: ", ftos(particle_bounce), "\n"));
729 print(strcat(" airfriction: ", ftos(particle_airfriction), "\n"));
730 print(strcat(" liquidfriction: ", ftos(particle_liquidfriction), "\n"));
731 print(strcat(" originjitter: ", ftos(particle_originjitter), "\n"));
732 print(strcat(" velocityjitter: ", ftos(particle_velocityjitter), "\n"));
733 print(strcat(" qualityreduction: ", ftos(particle_qualityreduction), "\n"));
734 print(strcat(" stretch: ", ftos(particle_stretch), "\n"));
735 print(strcat(" staincolor1: ", vtos(particle_staincolor1), "\n"));
736 print(strcat(" staincolor2: ", vtos(particle_staincolor2), "\n"));
737 print(strcat(" staintex: ", ftos(particle_staintex), "\n"));
738 print(strcat(" stainalpha: ", ftos(particle_stainalpha), "\n"));
739 print(strcat(" stainsize: ", ftos(particle_stainsize), "\n"));
740 print(strcat(" delayspawn: ", ftos(particle_delayspawn), "\n"));
741 print(strcat(" delaycollision: ", ftos(particle_delaycollision), "\n"));
742 print(strcat(" angle: ", ftos(particle_angle), "\n"));
743 print(strcat(" spin: ", ftos(particle_spin), "\n"));
744}
745
746// DP_CSQC_ENTITYTRANSPARENTSORTING_OFFSET
747// idea: VorteX
748// darkplaces implementation: VorteX
749float RF_USETRANSPARENTOFFSET = 64; // enables transparent origin offsetting
750// global definitions
751float transparent_offset; // should be set before entity is added
752// description: offset a model's meshes origin used for transparent sorting. Could be used to tweak sorting bugs on very large transparent entities or hacking transparent sorting order for certain objects
753// example: transparent_offset = 1000000; // entity always appear on background of other transparents
754// note: offset is done in view forward axis
755
756// DP_CSQC_ENTITYWORLDOBJECT
757// idea: VorteX
758// darkplaces implementation: VorteX
759const float RF_WORLDOBJECT = 128;
760// description: when renderflag is set, engine will not use culling methods for this entity, e.g. it will always be drawn
761// useful for large outdoor objects (like asteroids on sky horizon or sky models)
762
763// DP_CSQC_ENTITYMODELLIGHT
764// idea: VorteX
765// darkplaces implementation: VorteX
766const float RF_MODELLIGHT = 4096;
770// description: allows CSQC to override directional model lightning on entity
771
772// DP_CSQC_SETPAUSE
773// idea: VorteX
774// darkplaces implementation: VorteX
775// builtin definitions:
776void(float ispaused) setpause = #531;
777// description: provides ability to set pause in local games (similar to one set once console is activated)
778// not stopping sound/cd track, useful for inventory screens, ingame menus with input etc.
779
780// DP_CSQC_QUERYRENDERENTITY
781// idea: VorteX
782// darkplaces implementation: VorteX
783// constant definitions:
784// render entity fields:
785float E_ACTIVE = 0; // float 0/1
786float E_ORIGIN = 1; // vector
787float E_FORWARD = 2; // vector
788float E_RIGHT = 3; // vector
789float E_UP = 4; // vector
790float E_SCALE = 5; // float
791float E_ORIGINANDVECTORS = 6; // returns origin, + sets v_* vectors to orientation
792float E_ALPHA = 7; // float
793float E_COLORMOD = 8; // vector
794float E_PANTSCOLOR = 9; // vector
795float E_SHIRTCOLOR = 10; // vector
796float E_SKIN = 11; // float
797float E_MINS = 12; // vector
798float E_MAXS = 13; // vector
799float E_ABSMIN = 14; // vector
800float E_ABSMAX = 15; // vector
801float E_LIGHT = 16; // vector - modellight
802// builtin definitions:
803float(float entitynum, float fldnum) getentity = #504;
804vector(float entitynum, float fldnum) getentityvec = #504;
805// description: allows to query parms from render entities, especially useful with attaching CSQC ents to
806// server entities networked and interpolated by engine (monsters, players), number of entity is it's SVQC number
807// you can send it via tempentity/CSQC entity message. Note that this builtin doesnt know about entity removing/reallocating
808// so it's meaning to work for short period of time, dont use it on missiles/grenades whatever will be removed next five seconds
809
810//DP_GFX_FONTS
811//idea: Blub\0, divVerent
812//darkplaces implementation: Blub\0
813//console commands:
814// loadfont fontname fontmaps size1 size2 ...
815// A font can simply be gfx/tgafile (freetype fonts doent need extension),
816// or alternatively you can specify multiple fonts and faces
817// Like this: gfx/vera-sans:2,gfx/fallback:1
818// to load face 2 of the font gfx/vera-sans and use face 1
819// of gfx/fallback as fallback font
820// You can also specify a list of font sizes to load, like this:
821// loadfont console gfx/conchars,gfx/fallback 8 12 16 24 32
822// In many cases, 8 12 16 24 32 should be a good choice.
823// for slots see:
824//constant definitions:
825float drawfont; // set it before drawstring()/drawchar() calls
826float FONT_DEFAULT = 0; // 'default'
827float FONT_CONSOLE = 1; // 'console', REALLY should be fixed width (ls!)
828float FONT_SBAR = 2; // 'sbar', used on hud, must be fixed width
829float FONT_NOTIFY = 3; // 'notify', used on sprint/bprint
830float FONT_CHAT = 4; // 'chat'
831float FONT_CENTERPRINT = 5;// 'centerprint'
832float FONT_INFOBAR = 6; // 'infobar'
833float FONT_MENU = 7; // 'menu', should be fixed width
834float FONT_USER0 = 8; // 'user0', userdefined fonts
835float FONT_USER1 = 9; // 'user1', userdefined fonts
836float FONT_USER2 = 10; // 'user2', userdefined fonts
837float FONT_USER3 = 11; // 'user3', userdefined fonts
838float FONT_USER4 = 12; // 'user4', userdefined fonts
839float FONT_USER5 = 13; // 'user5', userdefined fonts
840float FONT_USER6 = 14; // 'user6', userdefined fonts
841float FONT_USER7 = 15; // 'user7' slot, userdefined fonts
842//builtin definitions:
843float findfont(string s) = #356; // find font by fontname and return it's index
844float loadfont(string fontname, string fontmaps, string sizes, float slot, float fix_scale, float fix_voffset) = #357;
845// loads font immediately so stringwidth() function can be used just after builtin call
846// returns a font slotnum (which is used to set drawfont to)
847// first 3 parms are identical to "loadfont" console command ones
848// slot could be one of FONT_ constants or result of findfont() or -1 to not use it
849// if slot is given, font will be loaded to this slotnum and fontname become new title for it
850// this way you can rename user* fonts to something more usable
851// fix_* parms let you fix badly made fonts by applying some transformations to them
852// fix_scale : per-character center-oriented scale (doesn't change line height at all)
853// fix_voffset : vertical offset for each character, it's a multiplier to character height
854float stringwidth(string text, float allowColorCodes, vector size) = #327; // get a width of string with given font and char size
855float stringwidth_menu(string text, float allowColorCodes, vector size) = #468; // in menu.dat it has different builtin #
856//description: engine support for custom fonts in console, hud, qc etc.
857// limits:
858// max 128 chars for font name
859// max 3 font fallbacks
860// max 8 sizes per font
861
862//DP_GFX_FONTS_FREETYPE
863//idea: Blub\0, divVerent
864//darkplaces implementation: Blub\0
865//cvar definitions:
866// r_font_disable_freetype 0/1 : disable freetype fonts loading (uttetly disables freetype library initialization)
867// r_font_antialias 0/1 : antialiasing when loading font
868// r_font_hint 0/1/2/3 : hinting when loading font, 0 is no hinting, 1 light autohinting , 2 full autohinting, 3 full hinting
869// r_font_postprocess_blur X : font outline blur amount
870// r_font_postprocess_outline X : font outline width
871// r_font_postprocess_shadow_x X : font outline shadow x shift amount, applied during outlining
872// r_font_postprocess_shadow_y X : font outline shadow y shift amount, applied during outlining
873// r_font_postprocess_shadow_z X : font outline shadow z shift amount, applied during blurring
874//description: engine support for truetype/freetype fonts
875//so .AFM+.PFB/.OTF/.TTF files could be stuffed as fontmaps in loadfont()
876//(console command version will support them as well)
877
878//DP_CSQC_BINDMAPS
879//idea: daemon, motorsep
880//darkplaces implementation: divVerent
881//builtin definitions:
882string(float key, float bindmap) getkeybind_bindmap = #342;
883float(float key, string bind, float bindmap) setkeybind_bindmap = #630;
884vector(void) getbindmaps = #631;
885float(vector bm) setbindmaps = #632;
886string(string command, float bindmap) findkeysforcommand = #610;
887//<already in EXT_CSQC> float(string key) stringtokeynum = #341;
888//<already in EXT_CSQC> string(float keynum) keynumtostring = #340;
889//description: key bind setting/getting including support for switchable
890//bindmaps.
891
892//DP_CRYPTO
893//idea: divVerent
894//darkplaces implementation: divVerent
895//builtin definitions: (CSQC)
896float(string url, float id, string content_type, string delim, float buf, float keyid) crypto_uri_postbuf = #513;
897//description:
898//use -1 as buffer handle to justs end delim as postdata
899
900//DP_CSQC_MAINVIEW
901//idea: divVerent
902//darkplaces implementation: divVerent
903//constant definitions:
904const float VF_MAINVIEW = 400;
905//use setproperty(VF_MAINVIEW, 1); before calling R_RenderView for the render
906//that shall become the "main" view, which is e.g. used by PRYDON_CLIENTCURSOR
907//this flag is set for the first scene, and not cleared by R_ClearScene
908//this flag is automatically cleared by R_RenderView
909//so when not using this extension, the first view rendered is the main view
910
911//DP_CSQC_MINFPS_QUALITY
912//idea: divVerent
913//darkplaces implementation: divVerent
914//constant definitions:
915const float VF_MINFPS_QUALITY = 401;
916//use getproperty(VF_MINFPS_QUALITY); to do CSQC based LOD based on cl_minfps
917//1 should lead to an unmodified view
918
919//DP_CSQC_V_CALCREFDEF_WIP1
920//DP_CSQC_V_CALCREFDEF_WIP2
921//idea: divVerent
922//darkplaces implementation: divVerent
923//builtin definitions:
924void(entity e, float refdefflags) V_CalcRefdef = #640;
925//constant definitions:
926float PMF_DUCKED = 4;
927float PMF_ONGROUND = 8;
932//- use this on the player entity after performing prediction
933//- pass REFDEFFLAG_TELEPORTED if the player teleported since last frame
934//- pass REFDEFFLAG_JUMPING if jump button is pressed
935//- pass REFDEFFLAG_DEAD if dead (DP_CSQC_V_CALCREFDEF_WIP2)
936//- pass REFDEFFLAG_INTERMISSION if in intermission (DP_CSQC_V_CALCREFDEF_WIP2)
937//- the player entity needs to have origin, velocity, pmove_flags set according
938// to prediction (the above two PMF_ flags are used in the player's pmove_flags)
939//- NOTE: to check for this, ALSO OR a check with DP_CSQC_V_CALCREFDEF to also support
940// the finished extension once done
941
942// assorted builtins
943float drawsubpic(vector position, vector size, string pic, vector srcPosition, vector srcSize, vector rgb, float alpha, float flag) = #328;
944vector drawgetimagesize(string pic) = #318;
945#define SPA_POSITION 0
946#define SPA_S_AXIS 1
947#define SPA_T_AXIS 2
948#define SPA_R_AXIS 3
949#define SPA_TEXCOORDS0 4
950#define SPA_LIGHTMAP0_TEXCOORDS 5
951#define SPA_LIGHTMAP_COLOR 6
952// float (entity e, float s) getsurfacenumpoints = #434;
953// vector (entity e, float s, float n) getsurfacepoint = #435;
954// vector (entity e, float s) getsurfacenormal = #436;
955// string (entity e, float s) getsurfacetexture = #437;
956// float (entity e, vector p) getsurfacenearpoint = #438;
957// vector (entity e, float s, vector p) getsurfaceclippedpoint = #439;
958// vector(entity e, float s, float n, float a) getsurfacepointattribute = #486;
959float(entity e, float s) getsurfacenumtriangles = #628;
960vector(entity e, float s, float n) getsurfacetriangle = #629;
961
962//DP_QC_ASINACOSATANATAN2TAN
963//idea: Urre
964//darkplaces implementation: LadyHavoc
965//constant definitions:
966float DEG2RAD = 0.0174532925199432957692369076848861271344287188854172545609719144;
967float RAD2DEG = 57.2957795130823208767981548141051703324054724665643215491602438612;
968float PI = 3.1415926535897932384626433832795028841971693993751058209749445923;
969//builtin definitions:
970/* -Wdouble-declaration
971float(float s) asin = #471; // returns angle in radians for a given sin() value, the result is in the range -PI*0.5 to PI*0.5
972float(float c) acos = #472; // returns angle in radians for a given cos() value, the result is in the range 0 to PI
973float(float t) atan = #473; // returns angle in radians for a given tan() value, the result is in the range -PI*0.5 to PI*0.5
974float(float c, float s) atan2 = #474; // returns angle in radians for a given cos() and sin() value pair, the result is in the range -PI to PI (this is identical to vectoyaw except it returns radians rather than degrees)
975float(float a) tan = #475; // returns tangent value (which is simply sin(a)/cos(a)) for the given angle in radians, the result is in the range -infinity to +infinity
976*/
977//description:
978//useful math functions for analyzing vectors, note that these all use angles in radians (just like the cos/sin functions) not degrees unlike makevectors/vectoyaw/vectoangles, so be sure to do the appropriate conversions (multiply by DEG2RAD or RAD2DEG as needed).
979//note: atan2 can take unnormalized vectors (just like vectoyaw), and the function was included only for completeness (more often you want vectoyaw or vectoangles), atan2(v_x,v_y) * RAD2DEG gives the same result as vectoyaw(v)
980
981//DP_QC_SPRINTF
982//idea: divVerent
983//darkplaces implementation: divVerent
984//builtin definitions:
985string(string format, ...) sprintf = #627;
986//description:
987//you know sprintf :P
988//supported stuff:
989// %
990// optional: <argpos>$ for the argument to format (the arg counter then is not increased)
991// flags: #0- +
992// optional: <width>, *, or *<argpos>$ for the field width (width is read before value and precision)
993// optional: .<precision>, .*, or .*<argpos>$ for the precision (precision is read before value)
994// length modifiers: h for forcing a float, l for forcing an int/entity (by default, %d etc. cast a float to int)
995// conversions:
996// d takes a float if no length is specified or h is, and an int/entity if l is specified as length, and cast it to an int
997// i takes an int/entity if no length is specified or i is, and a float if h is specified as length, and cast it to an int
998// ouxXc take a float if no length is specified or h is, and an int/entity if l is specified as length, and cast it to an unsigned int
999// eEfFgG take a float if no length is specified or h is, and an int/entity if l is specified as length, and cast it to a double
1000// s takes a string
1001// vV takes a vector, and processes the three components as if it were a gG for all three components, separated by space
1002// For conversions s and c, the flag # makes precision and width interpreted
1003// as byte count, by default it is interpreted as character count in UTF-8
1004// enabled engines. No other conversions can create wide characters, and #
1005// has another meaning in these.
1006
1007//DP_QC_GETTIME
1008//idea: tZork
1009//darkplaces implementation: tZork, divVerent
1010//constant definitions:
1011float GETTIME_FRAMESTART = 0; // time of start of frame relative to an arbitrary point in time (time of worldspawn)
1012float GETTIME_REALTIME = 1; // current time (may be OS specific)
1013float GETTIME_HIRES = 2; // like REALTIME, but relative to time at start of frame (thus can be higher precision)
1014float GETTIME_UPTIME = 3; // time of start of frame relative to start of the engine
1015//builtin definitions:
1016float(float tmr) gettime = #519;
1017//description:
1018//some timers to query...
1019
1020//DP_QC_GETTIME_CDTRACK
1021//idea: divVerent
1022//darkplaces implementation: divVerent
1023//constant definitions:
1025//description:
1026//returns the playing time of the current cdtrack when passed to gettime()
1027//see DP_END_GETSOUNDTIME for similar functionality but for entity sound channels
1028
1029//DP_QC_TOKENIZEBYSEPARATOR
1030//idea: Electro, SavageX, LadyHavoc
1031//darkplaces implementation: LadyHavoc
1032//builtin definitions:
1033float(string s, string separator1, ...) tokenizebyseparator = #479;
1034//description:
1035//this function returns tokens separated by any of the supplied separator strings, example:
1036//numnumbers = tokenizebyseparator("10.2.3.4", ".");
1037//returns 4 and the tokens are "10" "2" "3" "4"
1038//possibly useful for parsing IPv4 addresses (such as "1.2.3.4") and IPv6 addresses (such as "[1234:5678:9abc:def0:1234:5678:9abc:def0]:26000")
1039
1040//DP_QC_TOKENIZE_CONSOLE
1041//idea: divVerent
1042//darkplaces implementation: divVerent
1043//builtin definitions:
1044float(string s) tokenize_console = #514;
1045float(float i) argv_start_index = #515;
1046float(float i) argv_end_index = #516;
1047//description:
1048//this function returns tokens separated just like the console does
1049//also, functions are provided to get the index of the first and last character of each token in the original string
1050//Passing negative values to them, or to argv, will be treated as indexes from the LAST token (like lists work in Perl). So argv(-1) will return the LAST token.
1051
1052//DP_SND_SOUND7_WIP1
1053//DP_SND_SOUND7_WIP2
1054//idea: divVerent
1055//darkplaces implementation: divVerent
1056//builtin definitions:
1057void(entity e, float chan, string samp, float vol, float atten, float speed, float flags) sound7 = #8;
1059//description:
1060//plays a sound, with some more flags
1061//extensions to sound():
1062//- channel may be in the range from -128 to 127; channels -128 to 0 are "auto",
1063// i.e. support multiple sounds at once, but cannot be stopped/restarted
1064//- a value 0 in the speed parameter means no change; otherwise, it is a
1065// percentage of playback speed ("pitch shifting"). 100 is normal pitch, 50 is
1066// half speed, 200 is double speed, etc. (DP_SND_SOUND7_WIP2)
1067//- the flag SOUNDFLAG_RELIABLE can be specified, which makes the sound send
1068// to MSG_ALL (reliable) instead of MSG_BROADCAST (unreliable, default);
1069// similarily, SOUNDFLAG_RELIABLE_TO_ONE sends to MSG_ONE
1070//- channel 0 is controlled by snd_channel0volume; channel 1 and -1 by
1071// snd_channel1volume, etc. (so, a channel shares the cvar with its respective
1072// auto-channel); however, the mod MUST define snd_channel8volume and upwards
1073// in default.cfg if they are to be used, as the engine does not create them
1074// to not litter the cvar list
1075//- this extension applies to CSQC as well; CSQC_Event_Sound will get speed and
1076// flags as extra 7th and 8th argument
1077//- WIP2 ideas: SOUNDFLAG_RELIABLE_TO_ONE, SOUNDFLAG_NOPHS, SOUNDFLAG_FORCELOOP
1078//- NOTE: to check for this, ALSO OR a check with DP_SND_SOUND7 to also support
1079// the finished extension once done
1080
1081//DP_PRECACHE_PIC_FLAGS
1082//idea: divVerent
1083//darkplaces implementation: divVerent
1084//constant definitions:
1085float PRECACHE_PIC_FROMWAD = 1; // this one actually is part of EXT_CSQC
1086float PRECACHE_PIC_NOTPERSISTENT = 2; // picture may get deallocated when unused
1087float PRECACHE_PIC_MIPMAP = 8; // mipmap the texture for possibly better downscaling at memory expense
1088//notes: these constants are given as optional second argument to precache_pic()
1089
1090//DP_QC_TRACE_MOVETYPE_WORLDONLY
1091//idea: LadyHavoc
1092//darkplaces implementation: LadyHavoc
1093//constant definitions:
1095//description:
1096//allows traces to hit only world (ignoring all entities, unlike MOVE_NOMONSTERS which hits all bmodels), use as the nomonsters parameter to trace functions
1097
1098//DP_SND_GETSOUNDTIME
1099//idea: VorteX
1100//darkplaces implementation: VorteX
1101//constant definitions:
1102float(entity e, float channel) getsoundtime = #533; // get currently sound playing position on entity channel, -1 if not playing or error
1103float(string sample) soundlength = #534; // returns length of sound sample in seconds, -1 on error (sound not precached, sound system not initialized etc.)
1104//description: provides opportunity to query length of sound samples and realtime tracking of sound playing on entities (similar to DP_GETTIME_CDTRACK)
1105//note: beware dedicated server not running sound engine at all, so in dedicated mode this builtins will not work in server progs
1106//note also: menu progs not supporting getsoundtime() (will give a warning) since it has no sound playing on entities
1107//examples of use:
1108// - QC-driven looped sounds
1109// - QC events when sound playing is finished
1110// - toggleable ambientsounds
1111// - subtitles
1112
1113//DP_QC_NUM_FOR_EDICT
1114//idea: Blub\0
1115//darkplaces implementation: Blub\0
1116//Function to get the number of an entity - a clean way.
1117float(entity num) num_for_edict = #512;
1118
1119//DP_TRACE_HITCONTENTSMASK_SURFACEINFO
1120//idea: LadyHavoc
1121//darkplaces implementation: LadyHavoc
1122//globals:
1123.float dphitcontentsmask; // if non-zero on the entity passed to traceline/tracebox/tracetoss this will override the normal collidable contents rules and instead hit these contents values (for example AI can use tracelines that hit DONOTENTER if it wants to, by simply changing this field on the entity passed to traceline), this affects normal movement as well as trace calls
1124float trace_dpstartcontents; // DPCONTENTS_ value at start position of trace
1125float trace_dphitcontents; // DPCONTENTS_ value of impacted surface (not contents at impact point, just contents of the surface that was hit)
1126float trace_dphitq3surfaceflags; // Q3SURFACEFLAG_ value of impacted surface
1127string trace_dphittexturename; // texture name of impacted surface
1128//constants:
1129float DPCONTENTS_SOLID = 1; // hit a bmodel, not a bounding box
1134float DPCONTENTS_BODY = 32; // hit a bounding box, not a bmodel
1135float DPCONTENTS_CORPSE = 64; // hit a SOLID_CORPSE entity
1136float DPCONTENTS_NODROP = 128; // an area where backpacks should not spawn
1137float DPCONTENTS_PLAYERCLIP = 256; // blocks player movement
1138float DPCONTENTS_MONSTERCLIP = 512; // blocks monster movement
1139float DPCONTENTS_DONOTENTER = 1024; // AI hint brush
1140float DPCONTENTS_LIQUIDSMASK = 14; // WATER | SLIME | LAVA
1141float DPCONTENTS_BOTCLIP = 2048; // AI hint brush
1142float DPCONTENTS_OPAQUE = 4096; // only fully opaque brushes get this (may be useful for line of sight checks)
1144float Q3SURFACEFLAG_SLICK = 2; // low friction surface
1145float Q3SURFACEFLAG_SKY = 4; // sky surface (also has NOIMPACT and NOMARKS set)
1146float Q3SURFACEFLAG_LADDER = 8; // climbable surface
1147float Q3SURFACEFLAG_NOIMPACT = 16; // projectiles should remove themselves on impact (this is set on sky)
1148float Q3SURFACEFLAG_NOMARKS = 32; // projectiles should not leave marks, such as decals (this is set on sky)
1149float Q3SURFACEFLAG_FLESH = 64; // projectiles should do a fleshy effect (blood?) on impact
1150float Q3SURFACEFLAG_NODRAW = 128; // compiler hint (not important to qc)
1151//float Q3SURFACEFLAG_HINT = 256; // compiler hint (not important to qc)
1152//float Q3SURFACEFLAG_SKIP = 512; // compiler hint (not important to qc)
1153//float Q3SURFACEFLAG_NOLIGHTMAP = 1024; // compiler hint (not important to qc)
1154//float Q3SURFACEFLAG_POINTLIGHT = 2048; // compiler hint (not important to qc)
1155float Q3SURFACEFLAG_METALSTEPS = 4096; // walking on this surface should make metal step sounds
1156float Q3SURFACEFLAG_NOSTEPS = 8192; // walking on this surface should not make footstep sounds
1157float Q3SURFACEFLAG_NONSOLID = 16384; // compiler hint (not important to qc)
1158//float Q3SURFACEFLAG_LIGHTFILTER = 32768; // compiler hint (not important to qc)
1159//float Q3SURFACEFLAG_ALPHASHADOW = 65536; // compiler hint (not important to qc)
1160//float Q3SURFACEFLAG_NODLIGHT = 131072; // compiler hint (not important to qc)
1161//float Q3SURFACEFLAG_DUST = 262144; // translucent 'light beam' effect (not important to qc)
1162//description:
1163//adds additional information after a traceline/tracebox/tracetoss call.
1164//also (very important) sets trace_* globals before calling .touch functions,
1165//this allows them to inspect the nature of the collision (for example
1166//determining if a projectile hit sky), clears trace_* variables for the other
1167//object in a touch event (that is to say, a projectile moving will see the
1168//trace results in its .touch function, but the player it hit will see very
1169//little information in the trace_ variables as it was not moving at the time)
1170
1171//DP_QC_CVAR_TYPE
1172//idea: divVerent
1173//DarkPlaces implementation: divVerent
1174//builtin definitions:
1175float(string name) cvar_type = #495;
1182
1183//DP_QC_CRC16
1184//idea: divVerent
1185//darkplaces implementation: divVerent
1186//Some hash function to build hash tables with. This has to be be the CRC-16-CCITT that is also required for the QuakeWorld download protocol.
1187//When caseinsensitive is set, the CRC is calculated of the lower cased string.
1188float(float caseinsensitive, string s, ...) crc16 = #494;
1189
1190//DP_QC_WHICHPACK
1191//idea: divVerent
1192//darkplaces implementation: divVerent
1193//builtin definitions:
1194string(string filename) whichpack = #503;
1195//description:
1196//for files in a pak/pk3/whatever, returns the pack's file name in FRIK_FILE name space.
1197//for physical files, returns "".
1198//in case of error, returns string_null.
1199
1200//DP_QC_URI_ESCAPE
1201//idea: divVerent
1202//darkplaces implementation: divVerent
1203//URI::Escape's functionality
1204string(string in) uri_escape = #510;
1205string(string in) uri_unescape = #511;
1206
1207//DP_QC_DIGEST
1208//idea: motorsep, Spike
1209//DarkPlaces implementation: divVerent
1210//builtin definitions:
1211string(string digest, string data, ...) digest_hex = #639;
1212//description:
1213//returns a given hex digest of given data
1214//the returned digest is always encoded in hexadecimal
1215//only the "MD4" digest is always supported!
1216//if the given digest is not supported, string_null is returned
1217//the digest string is matched case sensitively, use "MD4", not "md4"!
1218
1219//DP_QC_DIGEST_SHA256
1220//idea: motorsep, Spike
1221//DarkPlaces implementation: divVerent
1222//description:
1223//"SHA256" is also an allowed digest type
1224
1225//DP_QC_LOG
1226//darkplaces implementation: divVerent
1227//builtin definitions:
1228float log(float f) = #532;
1229//description:
1230//logarithm
1231
1232//FTE_CSQC_SKELETONOBJECTS
1233//idea: Spike, LadyHavoc
1234//darkplaces implementation: LadyHavoc
1235//builtin definitions:
1236// all skeleton numbers are 1-based (0 being no skeleton)
1237// all bone numbers are 1-based (0 being invalid)
1238float(float modlindex) skel_create = #263; // create a skeleton (be sure to assign this value into .skeletonindex for use), returns skeleton index (1 or higher) on success, returns 0 on failure (for example if the modelindex is not skeletal), it is recommended that you create a new skeleton if you change modelindex, as the skeleton uses the hierarchy from the model.
1239float(float skel, entity ent, float modlindex, float retainfrac, float firstbone, float lastbone) skel_build = #264; // blend in a percentage of standard animation, 0 replaces entirely, 1 does nothing, 0.5 blends half, etc, and this only alters the bones in the specified range for which out of bounds values like 0,100000 are safe (uses .frame, .frame2, .frame3, .frame4, .lerpfrac, .lerpfrac3, .lerpfrac4, .frame1time, .frame2time, .frame3time, .frame4time), returns skel on success, 0 on failure
1240float(float skel) skel_get_numbones = #265; // returns how many bones exist in the created skeleton, 0 if skeleton does not exist
1241string(float skel, float bonenum) skel_get_bonename = #266; // returns name of bone (as a tempstring), "" if invalid bonenum (< 1 for example) or skeleton does not exist
1242float(float skel, float bonenum) skel_get_boneparent = #267; // returns parent num for supplied bonenum, 0 if bonenum has no parent or bone does not exist (returned value is always less than bonenum, you can loop on this)
1243float(float skel, string tagname) skel_find_bone = #268; // get number of bone with specified name, 0 on failure, bonenum (1-based) on success, same as using gettagindex but takes modelindex instead of entity
1244vector(float skel, float bonenum) skel_get_bonerel = #269; // get matrix of bone in skeleton relative to its parent - sets v_forward, v_right, v_up, returns origin (relative to parent bone)
1245vector(float skel, float bonenum) skel_get_boneabs = #270; // get matrix of bone in skeleton in model space - sets v_forward, v_right, v_up, returns origin (relative to entity)
1246void(float skel, float bonenum, vector org) skel_set_bone = #271; // set matrix of bone relative to its parent, reads v_forward, v_right, v_up, takes origin as parameter (relative to parent bone)
1247void(float skel, float bonenum, vector org) skel_mul_bone = #272; // transform bone matrix (relative to its parent) by the supplied matrix in v_forward, v_right, v_up, takes origin as parameter (relative to parent bone)
1248void(float skel, float startbone, float endbone, vector org) skel_mul_bones = #273; // transform bone matrices (relative to their parents) by the supplied matrix in v_forward, v_right, v_up, takes origin as parameter (relative to parent bones)
1249void(float skeldst, float skelsrc, float startbone, float endbone) skel_copybones = #274; // copy bone matrices (relative to their parents) from one skeleton to another, useful for copying a skeleton to a corpse
1250void(float skel) skel_delete = #275; // deletes skeleton at the beginning of the next frame (you can add the entity, delete the skeleton, renderscene, and it will still work)
1251float(float modlindex, string framename) frameforname = #276; // finds number of a specified frame in the animation, returns -1 if no match found
1252float(float modlindex, float framenum) frameduration = #277; // returns the intended play time (in seconds) of the specified framegroup, if it does not exist the result is 0, if it is a single frame it may be a small value around 0.1 or 0.
1253//fields:
1254.float skeletonindex; // active skeleton overriding standard animation on model
1255.float frame; // primary framegroup animation (strength = 1 - lerpfrac - lerpfrac3 - lerpfrac4)
1256.float frame2; // secondary framegroup animation (strength = lerpfrac)
1257.float frame3; // tertiary framegroup animation (strength = lerpfrac3)
1258.float frame4; // quaternary framegroup animation (strength = lerpfrac4)
1259.float lerpfrac; // strength of framegroup blend
1260.float lerpfrac3; // strength of framegroup blend
1261.float lerpfrac4; // strength of framegroup blend
1262.float frame1time; // start time of framegroup animation
1263.float frame2time; // start time of framegroup animation
1264.float frame3time; // start time of framegroup animation
1265.float frame4time; // start time of framegroup animation
1266//description:
1267//this extension provides a way to do complex skeletal animation on an entity.
1268//
1269//see also DP_SKELETONOBJECTS (this extension implemented on server as well as client)
1270//
1271//notes:
1272//each model contains its own skeleton, reusing a skeleton with incompatible models will yield garbage (or not render).
1273//each model contains its own animation data, you can use animations from other model files (for example saving out all character animations as separate model files).
1274//if an engine supports loading an animation-only file format such as .md5anim in FTEQW, it can be used to animate any model with a compatible skeleton.
1275//proper use of this extension may require understanding matrix transforms (v_forward, v_right, v_up, origin), and you must keep in mind that v_right is negative for this purpose.
1276//
1277//features include:
1278//multiple animations blended together.
1279//animating a model with animations from another model with a compatible skeleton.
1280//restricting animation blends to certain bones of a model - for example independent animation of legs, torso, head.
1281//custom bone controllers - for example making eyes track a target location.
1282//
1283//
1284//
1285//example code follows...
1286//
1287//this helper function lets you identify (by parentage) what group a bone
1288//belongs to - for example "torso", "leftarm", would return 1 ("torso") for
1289//all children of the bone named "torso", unless they are children of
1290//"leftarm" (which is a child of "torso") which would return 2 instead...
1291float(float skel, float bonenum, string g1, string g2, string g3, string g4, string g5, string g6) example_skel_findbonegroup =
1292{
1293 local string bonename;
1294 while (bonenum >= 0)
1295 {
1296 bonename = skel_get_bonename(skel, bonenum);
1297 if (bonename == g1) return 1;
1298 if (bonename == g2) return 2;
1299 if (bonename == g3) return 3;
1300 if (bonename == g4) return 4;
1301 if (bonename == g5) return 5;
1302 if (bonename == g6) return 6;
1303 bonenum = skel_get_boneparent(skel, bonenum);
1304 }
1305 return 0;
1306};
1307// create a skeletonindex for our player using current modelindex
1308void() example_skel_player_setup =
1309{
1310 self.skeletonindex = skel_create(self.modelindex);
1311};
1312// setup bones of skeleton based on an animation
1313// note: animmodelindex can be a different model than self.modelindex
1314void(float animmodelindex, float framegroup, float framegroupstarttime) example_skel_player_update_begin =
1315{
1316 // start with our standard animation
1317 self.frame = framegroup;
1318 self.frame2 = 0;
1319 self.frame3 = 0;
1320 self.frame4 = 0;
1321 self.frame1time = framegroupstarttime;
1322 self.frame2time = 0;
1323 self.frame3time = 0;
1324 self.frame4time = 0;
1325 self.lerpfrac = 0;
1326 self.lerpfrac3 = 0;
1327 self.lerpfrac4 = 0;
1328 skel_build(self.skeletonindex, self, animmodelindex, 0, 0, 100000);
1329};
1330// apply a different framegroup animation to bones with a specified parent
1331void(float animmodelindex, float framegroup, float framegroupstarttime, float blendalpha, string groupbonename, string excludegroupname1, string excludegroupname2) example_skel_player_update_applyoverride =
1332{
1333 local float bonenum;
1334 local float numbones;
1335 self.frame = framegroup;
1336 self.frame2 = 0;
1337 self.frame3 = 0;
1338 self.frame4 = 0;
1339 self.frame1time = framegroupstarttime;
1340 self.frame2time = 0;
1341 self.frame3time = 0;
1342 self.frame4time = 0;
1343 self.lerpfrac = 0;
1344 self.lerpfrac3 = 0;
1345 self.lerpfrac4 = 0;
1346 bonenum = 0;
1347 numbones = skel_get_numbones(self.skeletonindex);
1348 while (bonenum < numbones)
1349 {
1350 if (example_skel_findbonegroup(self.skeletonindex, bonenum, groupbonename, excludegroupname1, excludegroupname2, "", "", "") == 1)
1351 skel_build(self.skeletonindex, self, animmodelindex, 1 - blendalpha, bonenum, bonenum + 1);
1352 bonenum = bonenum + 1;
1353 }
1354};
1355// make eyes point at a target location, be sure v_forward, v_right, v_up are set correctly before calling
1356void(vector eyetarget, string bonename) example_skel_player_update_eyetarget =
1357{
1358 local float bonenum;
1359 local vector ang;
1360 local vector oldforward, oldright, oldup;
1361 local vector relforward, relright, relup, relorg;
1362 local vector boneforward, boneright, boneup, boneorg;
1363 local vector parentforward, parentright, parentup, parentorg;
1364 local vector u, v;
1365 local vector modeleyetarget;
1366 bonenum = skel_find_bone(self.skeletonindex, bonename) - 1;
1367 if (bonenum < 0)
1368 return;
1369 oldforward = v_forward;
1370 oldright = v_right;
1371 oldup = v_up;
1372 v = eyetarget - self.origin;
1373 modeleyetarget_x = v * v_forward;
1374 modeleyetarget_y = 0-v * v_right;
1375 modeleyetarget_z = v * v_up;
1376 // this is an eyeball, make it point at the target location
1377 // first get all the data we can...
1378 relorg = skel_get_bonerel(self.skeletonindex, bonenum);
1379 relforward = v_forward;
1380 relright = v_right;
1381 relup = v_up;
1382 boneorg = skel_get_boneabs(self.skeletonindex, bonenum);
1383 boneforward = v_forward;
1384 boneright = v_right;
1385 boneup = v_up;
1386 parentorg = skel_get_boneabs(self.skeletonindex, skel_get_boneparent(self.skeletonindex, bonenum));
1387 parentforward = v_forward;
1388 parentright = v_right;
1389 parentup = v_up;
1390 // get the vector from the eyeball to the target
1391 u = modeleyetarget - boneorg;
1392 // now transform it inversely by the parent matrix to produce new rel vectors
1393 v_x = u * parentforward;
1394 v_y = u * parentright;
1395 v_z = u * parentup;
1396 ang = vectoangles2(v, relup);
1397 ang_x = 0 - ang_x;
1398 makevectors(ang);
1399 // set the relative bone matrix
1400 skel_set_bone(self.skeletonindex, bonenum, relorg);
1401 // restore caller's v_ vectors
1402 v_forward = oldforward;
1403 v_right = oldright;
1404 v_up = oldup;
1405};
1406// delete skeleton when we're done with it
1407// note: skeleton remains valid until next frame when it is really deleted
1408void() example_skel_player_delete =
1409{
1410 skel_delete(self.skeletonindex);
1411 self.skeletonindex = 0;
1412};
1413//
1414// END OF EXAMPLES FOR FTE_CSQC_SKELETONOBJECTS
1415//
1416
1417//DP_QC_ENTITYDATA
1418//idea: KrimZon
1419//darkplaces implementation: KrimZon
1420//builtin definitions:
1421float() numentityfields = #496;
1422string(float fieldnum) entityfieldname = #497;
1423float(float fieldnum) entityfieldtype = #498;
1424string(float fieldnum, entity ent) getentityfieldstring = #499;
1425float(float fieldnum, entity ent, string s) putentityfieldstring = #500;
1426//constants:
1427//Returned by entityfieldtype
1429float FIELD_FLOAT = 2;
1433//description:
1434//Versatile functions intended for storing data from specific entities between level changes, but can be customized for some kind of partial savegame.
1435//WARNING: .entity fields cannot be saved and restored between map loads as they will leave dangling pointers.
1436//numentityfields returns the number of entity fields. NOT offsets. Vectors comprise 4 fields: v, v_x, v_y and v_z.
1437//entityfieldname returns the name as a string, eg. "origin" or "classname" or whatever.
1438//entityfieldtype returns a value that the constants represent, but the field may be of another type in more exotic progs.dat formats or compilers.
1439//getentityfieldstring returns data as would be written to a savegame, eg... "0.05" (float), "0 0 1" (vector), or "Hello World!" (string). Function names can also be returned.
1440//putentityfieldstring puts the data returned by getentityfieldstring back into the entity.
1441
1442//DP_QC_ENTITYSTRING
1443void(string s) loadfromdata = #529;
1444void(string s) loadfromfile = #530;
1445void(string s) callfunction = #605;
1446void(float fh, entity e) writetofile = #606;
1447float(string s) isfunction = #607;
1448void(entity e, string s) parseentitydata = #608;
1449
1450//DP_QC_FINDCHAIN_TOFIELD
1451//see: dpextensions.qc
1452entity(vector org, float rad, .entity tofield) findradius_tofield = #22;
1453entity(.string fld, string match, .entity tofield) findchain_tofield = #402;
1454entity(.float fld, float match, .entity tofield) findchainflags_tofield = #450;
1455entity(.float fld, float match, .entity tofield) findchainfloat_tofield = #403;
1456
1457//DP_COVERAGE
1458//idea: divVerent
1459//darkplaces implementation: divVerent
1460//function definitions:
1461void coverage() = #642; // Reports a coverage event. The engine counts for each of the calls to this builtin whether it has been called.
1462
1463//DP_RM_CLIPGROUP
1464//see: dpextensions.qc
1466
1467//DP_QC_FS_SEARCH_PACKFILE
1468//idea: Mario
1469//darkplaces implementation: Mario
1470//builtin definitions:
1471float(string pattern, float caseinsensitive, float quiet, string packfile) search_packfile_begin = #444;
1472//description:
1473//extension to search_begin (DP_QC_FS_SEARCH), performs a filename search with the specified pattern (for example "maps/*.bsp") and stores the results in a search slot (minimum of 128 supported by any engine with this extension), the other functions take this returned search slot number, be sure to search_free when done (they are also freed on progs reload).
1474//only searches for files within the specified packfile, which is expected to match the results of whichpack().
1475
1476//DP_QC_FINDBOX
1477//see: dpextensions.qc
1478entity(vector mins, vector maxs) findbox = #566;
1479entity(vector mins, vector maxs, .entity tofield) findbox_tofield = #566;
1480
1481//DP_QC_NUDGEOUTOFSOLID
1482//see: dpextensions.qc
1483float(entity ent) nudgeoutofsolid = #567;
1484
1485// assorted builtins
1486const float STAT_MOVEVARS_TICRATE = 240;
1487const float STAT_MOVEVARS_TIMESCALE = 241;
1488const float STAT_FRAGLIMIT = 235;
1489const float STAT_TIMELIMIT = 236;
1490const float STAT_MOVEVARS_GRAVITY = 242;
1491string(void) ReadPicture = #501;
1496float PARTICLES_USEFADE = 4; // fades the COUNT (fade alpha using alphamin/alphamax)
1499void(float effectindex, entity own, vector org_from, vector org_to, vector dir_from, vector dir_to, float countmultiplier, float flags) boxparticles = #502;
1501const float RF_FULLBRIGHT = 256;
1502const float RF_NOSHADOW = 512;
1504
1511float checkpvs(vector viewpos, entity viewee) = #240;
1512float mod(float dividend, float divisor) = #245;
#define sprintf
Definition common.h:269
#define strcat
Definition common.h:255
#define RF_USETRANSPARENTOFFSET
Definition csprogs.h:88
const float MASK_ENGINE
float particle_delaycollision
const float RF_WORLDOBJECT
vector v_up
const float STAT_SECRETS
vector size
const float TE_EXPLOSIONRGB
const float PFL_GIBBED
float E_ABSMIN
string classname
float Q3SURFACEFLAG_SKY
float clientcommandframe
const float STAT_TIMELIMIT
float particle_spin
float REFDEFFLAG_JUMPING
float movetype
float PT_BUBBLE
float FIELD_FUNCTION
float flags
float drawsubpic(vector position, vector size, string pic, vector srcPosition, vector srcSize, vector rgb, float alpha, float flag)
float DPCONTENTS_SKY
float E_RIGHT
const float VF_DRAWENGINESBAR
const float TE_TAREXPLOSION
float particle_stretch
const float VF_MAINVIEW
const float DRAWFLAG_NORMAL
const float MOVE_NOMONSTERS
float FONT_USER0
float frame3time
const float SOLID_SLIDEBOX
const float TE_EXPLOSION2
float trace_dphitcontents
float particle_alphafade
const float LP_COMPLETE
vector particle_staincolor2
const float TE_KNIGHTSPIKE
float E_LIGHT
float Q3SURFACEFLAG_NONSOLID
float FONT_USER2
float Q3SURFACEFLAG_LADDER
const float EF_STARDUST
float DPCONTENTS_NODROP
float drawmask
float particle_tex
float particle_size
const float STAT_MOVEVARS_TICRATE
float E_SKIN
float FONT_CONSOLE
float particle_qualityreduction
float maxclients
const float STAT_VIEWHEIGHT
float frame1time
float FIELD_ENTITY
float FONT_USER3
const float VF_CL_VIEWANGLES
float REFDEFFLAG_DEAD
entity trace_ent
vector particle_color2
const float VF_PERSPECTIVE
const float RF_MODELLIGHT
entity other
vector pmove_vel
float GETTIME_UPTIME
const float CONTENT_SKY
float PT_RAIN
float DPCONTENTS_BOTCLIP
const float STAT_CELLS
float E_FORWARD
const float SOLID_TRIGGER
const float CHAN_AUTO
float FIELD_VECTOR
float DPCONTENTS_DONOTENTER
vector input_angles
const float ATTN_NONE
float GETTIME_HIRES
float modelindex
float DEG2RAD
float gettaginfo_parent
void CSQC_UpdateView(float vid_width, float vid_height, float notmenu)
const float RF_ADDITIVE
entity self
float FONT_NOTIFY
string netname
float PT_SPARK
float frame2time
float DPCONTENTS_SOLID
vector VEC_HULL_MAX
vector particle_staincolor1
float frame2
const float VF_MIN
float FONT_CHAT
float PMF_DUCKED
float E_MINS
vector getlight_dir
const float STAT_TOTALSECRETS
const float TE_LIGHTNING3
float RAD2DEG
vector getlight_diffuse
float particle_delayspawn
const float VF_ORIGIN
float CVAR_TYPEFLAG_HASDESCRIPTION
vector particles_colormin
const float PFLAGS_NOSHADOW
const float CONTENT_SOLID
vector getlight_ambient
float PARTICLE_SPARK
const float DRAWFLAG_ADDITIVE
vector avelocity
const float RF_USEAXIS
const float STAT_ROCKETS
float frametime
float E_SHIRTCOLOR
entity owner
const float TE_SPIKE
float movevar_accelerate
float PI
float particle_time
vector view_punchangle
float PBLEND_ALPHA
const float MASK_NORMAL
float lerpfrac
string mapname
float Q3SURFACEFLAG_NODRAW
const float TE_SPIKEQUAD
const float TE_SUPERSPIKEQUAD
float FONT_SBAR
float FONT_USER5
float frame3
const float VF_FOVY
float stringwidth_menu(string text, float allowColorCodes, vector size)
const float PFL_ONGROUND
float E_COLORMOD
float Q3SURFACEFLAG_SLICK
const float VF_DRAWWORLD
float player_localnum
float CVAR_TYPEFLAG_ENGINE
const float DRAWFLAG_2XMODULATE
vector pmove_org
void coverage()
float mod(float dividend, float divisor)
vector modellight_dir
const float MOVE_NORMAL
float lerpfrac4
const float STAT_ACTIVEWEAPON
float E_MAXS
float E_ACTIVE
const float STAT_MOVEVARS_GRAVITY
float DPCONTENTS_CORPSE
const float TE_EXPLOSION
vector VEC_HULL_MIN
vector mins
float DPCONTENTS_LIQUIDSMASK
float particle_originjitter
const float VF_ANGLES_Y
float PT_BLOOD
float transparent_offset
float FONT_MENU
const float TE_LIGHTNING2
const float VF_ORIGIN_Y
float PRECACHE_PIC_FROMWAD
const float EF_RED
const float STAT_SHELLS
float CSQC_InputEvent(float evtype, float scanx, float chary)
float clipgroup
const float STAT_MONSTERS
float trace_dpstartcontents
float Q3SURFACEFLAG_FLESH
const float FALSE
const float SOLID_CORPSE
float frame4time
const float TE_SUPERSPIKE
float PARTICLE_ORIENTED_DOUBLESIDED
const float CHAN_BODY
vector velocity
const float EF_ADDITIVE
float CVAR_TYPEFLAG_EXISTS
vector drawgetimagesize(string pic)
float FONT_USER1
float DPCONTENTS_BODY
const float SOLID_BBOX
const vector VEC_0
float PT_ENTITYPARTICLE
vector view_angles
float FIELD_STRING
const float CONTENT_WATER
entity world
const float DRAWFLAG_SCREEN
float movevar_entgravity
float GETTIME_REALTIME
entity chain
vector gettaginfo_forward
vector pmove_maxs
const float EXTRA_LOW
const float EF_FULLBRIGHT
float particle_gravity
float PT_DECAL
float lerpfrac3
float CSQC_ConsoleCommand(string cmdstr)
const float VF_CL_VIEWANGLES_Y
const float STAT_HEALTH
const float SOLID_NOT
string trace_dphittexturename
float particle_sizeincrease
float effects
float FONT_USER4
const float VF_ORIGIN_X
float particle_airfriction
const float LP_LIGHTMAP
float movevar_spectatormaxspeed
string gettaginfo_name
const float FILE_READ
const float RF_VIEWMODEL
const float VF_ORIGIN_Z
vector modellight_ambient
float E_UP
const float VF_CL_VIEWANGLES_X
const float VF_MINFPS_QUALITY
float FONT_USER7
const float EXTRA_HIGH
void() predraw
const float FILE_WRITE
float GETTIME_CDTRACK
vector modellight_diffuse
float DPCONTENTS_PLAYERCLIP
const float STAT_WEAPONMODEL
float DPCONTENTS_SLIME
float skin
const float STAT_MOVEVARS_TIMESCALE
float FIELD_FLOAT
float skeletonindex
float loadfont(string fontname, string fontmaps, string sizes, float slot, float fix_scale, float fix_voffset)
float time
float Q3SURFACEFLAG_METALSTEPS
const float STAT_FRAGLIMIT
float DPCONTENTS_OPAQUE
vector v_right
vector input_movevalues
void end_sys_globals
const float TE_TELEPORT
float PT_SMOKE
const float TE_GUNSHOTQUAD
float trace_networkentity
float CVAR_TYPEFLAG_READONLY
vector trace_endpos
const float STAT_NAILS
float stringwidth(string text, float allowColorCodes, vector size)
float trace_startsolid
vector maxs
float DPCONTENTS_MONSTERCLIP
float FONT_DEFAULT
float log(float f)
const float EF_FLAME
float E_ORIGINANDVECTORS
const float CHAN_ITEM
float input_buttons
entity enemy
float particles_alphamax
float particle_stainsize
float particle_liquidfriction
float PT_SNOW
float nextthink
float PBLEND_INVMOD
const float TE_GUNSHOT
const float VF_FOV
const float M_PI
const float PFL_DEAD
float REFDEFFLAG_INTERMISSION
const vector VEC_M1
float movevar_friction
float trace_inopen
vector angles
float MOVE_WORLDONLY
const float VF_MIN_X
float trace_dphitq3surfaceflags
const float CHAN_VOICE
float REFDEFFLAG_TELEPORTED
float FONT_INFOBAR
float colormap
const vector VEC_1
float particle_velocityjitter
float movevar_airaccelerate
float frame4
vector particles_colormax
float particle_staintex
const float VF_ANGLES
float particle_type
float PT_RAINDECAL
const float STAT_WEAPONFRAME
const float DRAWFLAG_MODULATE
const float STAT_AMMO
const float VF_SIZE_Y
float player_localentnum
const float PFL_CROUCH
vector() randomvec
float movevar_wateraccelerate
const float TE_EXPLOSIONQUAD
float intermission
const float EF_BLUE
vector absmax
vector v_forward
void CSQC_Init(float apilevel, string enginename, float engineversion)
float entnum
const float EF_NODEPTHTEST
float E_SCALE
const float EF_SELECTABLE
vector origin
float findfont(string s)
const float VF_VIEWPORT
vector gettaginfo_right
vector pmove_mins
const float STAT_ITEMS
const float VF_ANGLES_X
void end_sys_fields
float PMF_ONGROUND
float PARTICLES_USEALPHA
float PT_STATIC
float particle_stainalpha
float CVAR_TYPEFLAG_SAVED
const float VF_DRAWCROSSHAIR
vector gettaginfo_up
const float STAT_ARMOR
float PT_BEAM
string model
float trace_fraction
vector gettaginfo_offset
entity() spawn
float PRECACHE_PIC_NOTPERSISTENT
float servercommandframe
float PARTICLE_BILLBOARD
float particles_alphamin
float DPCONTENTS_LAVA
vector oldorigin
float solid
vector absmin
float SOUNDFLAG_RELIABLE
const float TRUE
const float ATTN_NORM
float input_timelength
const float VF_MIN_Y
const float CONTENT_LAVA
const float VF_CL_VIEWANGLES_Z
float PARTICLE_BEAM
const float VF_SIZE
float DPCONTENTS_WATER
void CSQC_Shutdown()
const float TE_LAVASPLASH
float frame
const float MOVE_MISSILE
const float RF_EXTERNALMODEL
float trace_allsolid
const float RF_FULLBRIGHT
const float CONTENT_EMPTY
float Q3SURFACEFLAG_NOIMPACT
float PRECACHE_PIC_MIPMAP
float Q3SURFACEFLAG_NOMARKS
const float PFLAGS_CORONA
float CVAR_TYPEFLAG_PRIVATE
float RF_DYNAMICMODELLIGHT
float GETTIME_FRAMESTART
const float VF_SIZE_X
float particle_angle
float PARTICLES_USECOLOR
const float EF_NOSHADOW
float E_ALPHA
const float EF_NODRAW
const float CHAN_WEAPON
const float TE_LIGHTNING1
float Q3SURFACEFLAG_NODAMAGE
const float VF_ANGLES_Z
const float DRAWFLAG_MIPMAP
const float ATTN_STATIC
float() random
Definition shader_glsl.h:53
float particles_fade
float movevar_gravity
float FONT_USER6
vector view_punchvector
float E_PANTSCOLOR
float drawfont
float movevar_stopspeed
float Q3SURFACEFLAG_NOSTEPS
float particle_orientation
float E_ABSMAX
float PBLEND_ADD
const float RF_NOSHADOW
float movevar_maxspeed
vector particle_color1
const float SOLID_BSP
const float RF_DEPTHHACK
float particle_blendmode
float PT_ALPHASTATIC
const float FILE_APPEND
const float VF_FOVX
string() ReadString
Definition glquake.h:728
float movevar_waterfriction
float PARTICLES_USEFADE
float E_ORIGIN
vector trace_plane_normal
const float MASK_ENGINEVIEWMODELS
const float TE_WIZSPIKE
const float STAT_TOTALMONSTERS
const float LP_RTWORLD
float trace_plane_dist
float particle_alpha
float trace_inwater
float dphitcontentsmask
const float ATTN_IDLE
float FONT_CENTERPRINT
float PARTICLES_DRAWASTRAIL
float particle_bounce
const float LP_DYNLIGHT
const float CONTENT_SLIME
const float PFLAGS_FULLDYNAMIC
char engineversion[128]
version string for the corner of the console, crash messages, status command, etc
Definition host.c:304
float scale
float style
float pflags
vector color
float alpha
#define n(x, y)
GLenum GLsizei width
Definition glquake.h:622
GLenum GLsizei GLsizei height
Definition glquake.h:622
GLfloat GLfloat GLfloat v2
Definition glquake.h:747
GLubyte GLubyte GLubyte GLubyte w
Definition glquake.h:782
GLenum mode
Definition glquake.h:718
GLint GLint GLint GLint GLint GLint GLint GLbitfield mask
Definition glquake.h:609
GLsizei const GLfloat * value
Definition glquake.h:740
GLenum GLuint GLenum GLsizei length
Definition glquake.h:657
const GLdouble * v
Definition glquake.h:762
GLenum GLenum GLsizei count
Definition glquake.h:656
GLint GLint GLint GLsizei GLsizei GLenum format
Definition glquake.h:649
GLint GLenum GLint GLint y
Definition glquake.h:651
GLint GLenum GLint x
Definition glquake.h:651
GLsizeiptr const GLvoid * data
Definition glquake.h:639
GLfloat GLfloat v1
Definition glquake.h:743
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition glquake.h:657
const GLchar * name
Definition glquake.h:601
#define max(A, B)
Definition mathlib.h:38
#define min(A, B)
Definition mathlib.h:37
#define bound(min, num, max)
Definition mathlib.h:34
string precache_file(string file)
void loadfromdata(string data)
float pow(float a, float b)
float registercvar(string name, string value, float flags)
void localcmd(string command,...)
void cvar_set(string name, string value)
float gecko_create(string name)
string fgets(float fhandle)
void copyentity(entity src, entity dst)
float isdemo()
float drawfill(vector position, vector size, vector rgb, float alpha, float flag)
void fclose(float fhandle)
float ceil(float f)
float strlen(string s)
void writetofile(float fhandle, entity ent)
entity findentity(entity start,.entity field, entity match)
float stof(string val,...)
void fputs(float fhandle, string s)
entity nextent(entity e)
void drawresetcliparea(void)
entity findchainfloat(.float field, float match)
void traceon(void)
string substring(string s, float start, float length)
float cvar(string name)
float fopen(string filename, float mode)
entity find(entity start,.string field, string match)
entity findflags(entity start,.float field, float match)
string search_getfilename(float handle, float num)
void error(string err,...)
float gettime(void)
float vectoyaw(vector v)
float cos(float f)
entity spawn(void)
string keynumtostring(float keynum)
vector stov(string s)
float random(void)
float drawcolorcodedstring(vector position, string text, vector scale, float alpha, float flag)
string precache_pic(string name,...)
void gecko_resize(string name, float w, float h)
const string cvar_string(string name)
float search_getsize(float handle)
vector drawcolorcodedstring2(vector position, string text, vector scale, vector rgb, float alpha, float flag)
void gecko_navigate(string name, string URI)
void gecko_mousemove(string name, float x, float y)
float vlen(vector v)
vector vectoangles(vector v)
float sqrt(float f)
void dprint(string text,...)
float search_begin(string pattern, float caseinsensitive, float quiet)
void objerror(string err,...)
void callfunction(...)
void parseentitydata(entity ent, string data)
void gecko_destroy(string name)
void coredump(void)
string precache_sound(string sample)
void localsound(string sample)
vector randomvec(void)
void drawsetcliparea(float x, float y, float width, float height)
float drawpic(vector position, string pic, vector size, vector rgb, float alpha, float flag)
float isserver(void)
void centerprint(string text,...)
float sin(float f)
float isfunction(string function_name)
string vtos(vector v)
float gecko_keyevent(string name, float key, float eventtype)
float checkextension(string ext)
void strunzone(string s)
void loadfromfile(string file)
float rint(float f)
vector normalize(vector v)
string ftos(float f)
void eprint(entity e)
entity findchainflags(.float field, float match)
void freepic(string name)
float fabs(float f)
void print(string text,...)
float floor(float f)
const string cvar_defstring(string name)
void traceoff(void)
float tokenize(string s)
vector getmousepos(void)
string strzone(string s)
float drawcharacter(vector position, float character, vector scale, vector rgb, float alpha, float flag)
string argv(float n)
entity findfloat(entity start,.float field, float match)
void search_end(float handle)
float drawstring(vector position, string text, vector scale, vector rgb, float alpha, float flag)
float iscachedpic(string name)
void remove(entity e)
string etos(entity e)
vector gecko_get_texture_extent(string name)
prvm_uint_t ofs
int i
cvar_t nomonsters
Definition sv_main.c:48
vec2 dir
return position
float f
dp_FragColor b
dp_FragColor rgb
ret a
cvar_t volume
Definition snd_main.c:166
static vec3_t forward
Definition sv_user.c:305
static vec3_t right
Definition sv_user.c:305
static vec3_t up
Definition sv_user.c:305
static unsigned char * checkpvs
Definition svvm_cmds.c:784
cvar_t vid_width
Definition vid_shared.c:136
cvar_t vid_height
Definition vid_shared.c:137
void V_CalcRefdef(void)
Definition view.c:944