Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!
Difference between revisions of "EXT CSQC System Globals Fields and Builtins List"
From Quake Wiki
Line 1: | Line 1: | ||
==System Globals== | ==System Globals== | ||
<pre> | <pre> | ||
− | entity self; | + | entity self; |
− | entity other; | + | entity other; |
− | entity world; | + | entity world; |
− | float time; | + | float time; |
− | float frametime; | + | float frametime; |
− | + | ||
− | float player_localentnum; //the entnum | + | float player_localentnum; //the entnum |
− | float player_localnum; //the playernum | + | float player_localnum; //the playernum |
− | float maxclients; //a constant filled in by the engine | + | float maxclients; //a constant filled in by the engine |
− | + | ||
− | float clientcommandframe; //player movement | + | float clientcommandframe; //player movement |
− | float servercommandframe; //clientframe echoed off the server | + | float servercommandframe; //clientframe echoed off the server |
− | string mapname; | + | string mapname; |
− | + | ||
− | // | + | // |
− | // global variables set by built in functions | + | // global variables set by built in functions |
− | // | + | // |
− | vector v_forward, v_up, v_right; // set by makevectors() | + | vector v_forward, v_up, v_right; // set by makevectors() |
− | + | ||
− | // set by traceline / tracebox | + | // set by traceline / tracebox |
− | float trace_allsolid; | + | float trace_allsolid; |
− | float trace_startsolid; | + | float trace_startsolid; |
− | float trace_fraction; | + | float trace_fraction; |
− | vector trace_endpos; | + | vector trace_endpos; |
− | vector trace_plane_normal; | + | vector trace_plane_normal; |
− | float trace_plane_dist; | + | float trace_plane_dist; |
− | entity trace_ent; | + | entity trace_ent; |
− | float trace_inopen; | + | float trace_inopen; |
− | float trace_inwater; | + | float trace_inwater; |
− | + | ||
− | // | + | // |
− | // required prog functions | + | // required prog functions |
− | // | + | // |
− | void() CSQC_Init; | + | void() CSQC_Init; |
− | void() CSQC_Shutdown; | + | void() CSQC_Shutdown; |
− | float(float f, float t) CSQC_InputEvent; | + | float(float f, float t) CSQC_InputEvent; |
− | void() CSQC_UpdateView; | + | void() CSQC_UpdateView; |
− | float(string s) CSQC_ConsoleCommand; | + | float(string s) CSQC_ConsoleCommand; |
− | + | ||
− | //these fields are read and set by the default player physics | + | //these fields are read and set by the default player physics |
− | vector pmove_org; | + | vector pmove_org; |
− | vector pmove_vel; | + | vector pmove_vel; |
− | vector pmove_mins; | + | vector pmove_mins; |
− | vector pmove_maxs; | + | vector pmove_maxs; |
− | //retrieved from the current movement commands (read by player physics) | + | //retrieved from the current movement commands (read by player physics) |
− | float input_timelength; | + | float input_timelength; |
− | vector input_angles; | + | vector input_angles; |
− | vector input_movevalues; //forwards, right, up. | + | vector input_movevalues; //forwards, right, up. |
− | float input_buttons; //attack, use, jump (default physics only uses jump) | + | float input_buttons; //attack, use, jump (default physics only uses jump) |
− | + | ||
− | float movevar_gravity; | + | float movevar_gravity; |
− | float movevar_stopspeed; | + | float movevar_stopspeed; |
− | float movevar_maxspeed; | + | float movevar_maxspeed; |
− | float movevar_spectatormaxspeed; //used by NOCLIP movetypes. | + | float movevar_spectatormaxspeed; //used by NOCLIP movetypes. |
− | float movevar_accelerate; | + | float movevar_accelerate; |
− | float movevar_airaccelerate; | + | float movevar_airaccelerate; |
− | float movevar_wateraccelerate; | + | float movevar_wateraccelerate; |
− | float movevar_friction; | + | float movevar_friction; |
− | float movevar_waterfriction; | + | float movevar_waterfriction; |
− | float movevar_entgravity; //the local player's gravity field. Is a multiple (1 is the normal value) | + | float movevar_entgravity; //the local player's gravity field. Is a multiple (1 is the normal value) |
</pre> | </pre> | ||
==System Fields== | ==System Fields== | ||
<pre> | <pre> | ||
− | .float modelindex; // *** model index in the precached list | + | .float modelindex; // *** model index in the precached list |
− | .vector absmin, absmax; // *** origin + mins / maxs | + | .vector absmin, absmax; // *** origin + mins / maxs |
− | + | ||
− | .float entnum; // *** the ent number as on the server | + | .float entnum; // *** the ent number as on the server |
− | .float drawmask; | + | .float drawmask; |
− | .void() predraw; | + | .void() predraw; |
− | .float movetype; | + | .float movetype; |
− | .float solid; | + | .float solid; |
− | + | ||
− | .vector origin; // *** | + | .vector origin; // *** |
− | .vector oldorigin; // *** | + | .vector oldorigin; // *** |
− | .vector velocity; | + | .vector velocity; |
− | .vector angles; | + | .vector angles; |
− | .vector avelocity; | + | .vector avelocity; |
− | + | ||
− | .string classname; // spawn function | + | .string classname; // spawn function |
− | .string model; | + | .string model; |
− | .float frame; | + | .float frame; |
− | .float skin; | + | .float skin; |
− | .float effects; | + | .float effects; |
− | + | ||
− | .vector mins, maxs; // bounding box extents reletive to origin | + | .vector mins, maxs; // bounding box extents reletive to origin |
− | .vector size; // maxs - mins | + | .vector size; // maxs - mins |
− | + | ||
− | .void() touch; | + | .void() touch; |
− | .void() use; | + | .void() use; |
− | .void() think; | + | .void() think; |
− | .void() blocked; // for doors or plats, called when can't push other | + | .void() blocked; // for doors or plats, called when can't push other |
− | + | ||
− | .float nextthink; | + | .float nextthink; |
− | .entity chain; | + | .entity chain; |
− | .string netname; | + | .string netname; |
− | .entity enemy; | + | .entity enemy; |
− | .float flags; | + | .float flags; |
− | .float colormap; | + | .float colormap; |
− | .entity owner; | + | .entity owner; |
</pre> | </pre> | ||
==Builtins== | ==Builtins== |
Revision as of 17:27, 17 January 2008
System Globals
entity self; entity other; entity world; float time; float frametime; float player_localentnum; //the entnum float player_localnum; //the playernum float maxclients; //a constant filled in by the engine float clientcommandframe; //player movement float servercommandframe; //clientframe echoed off the server string mapname; // // global variables set by built in functions // vector v_forward, v_up, v_right; // set by makevectors() // set by traceline / tracebox float trace_allsolid; float trace_startsolid; float trace_fraction; vector trace_endpos; vector trace_plane_normal; float trace_plane_dist; entity trace_ent; float trace_inopen; float trace_inwater; // // required prog functions // void() CSQC_Init; void() CSQC_Shutdown; float(float f, float t) CSQC_InputEvent; void() CSQC_UpdateView; float(string s) CSQC_ConsoleCommand; //these fields are read and set by the default player physics vector pmove_org; vector pmove_vel; vector pmove_mins; vector pmove_maxs; //retrieved from the current movement commands (read by player physics) float input_timelength; vector input_angles; vector input_movevalues; //forwards, right, up. float input_buttons; //attack, use, jump (default physics only uses jump) float movevar_gravity; float movevar_stopspeed; float movevar_maxspeed; float movevar_spectatormaxspeed; //used by NOCLIP movetypes. float movevar_accelerate; float movevar_airaccelerate; float movevar_wateraccelerate; float movevar_friction; float movevar_waterfriction; float movevar_entgravity; //the local player's gravity field. Is a multiple (1 is the normal value)
System Fields
.float modelindex; // *** model index in the precached list .vector absmin, absmax; // *** origin + mins / maxs .float entnum; // *** the ent number as on the server .float drawmask; .void() predraw; .float movetype; .float solid; .vector origin; // *** .vector oldorigin; // *** .vector velocity; .vector angles; .vector avelocity; .string classname; // spawn function .string model; .float frame; .float skin; .float effects; .vector mins, maxs; // bounding box extents reletive to origin .vector size; // maxs - mins .void() touch; .void() use; .void() think; .void() blocked; // for doors or plats, called when can't push other .float nextthink; .entity chain; .string netname; .entity enemy; .float flags; .float colormap; .entity owner;