Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!
Editing EXT CSQC System Globals Fields and Builtins List
From Quake Wiki
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
==System Globals== | ==System Globals== | ||
− | < | + | <code> |
− | entity self; | + | entity self;<br> |
− | entity other; | + | entity other;<br> |
− | entity world; | + | entity world;<br> |
− | float time; | + | float time;<br> |
− | float frametime; | + | float frametime;<br> |
− | + | <br> | |
− | float player_localentnum; //the entnum | + | float player_localentnum; //the entnum<br> |
− | float player_localnum; //the playernum | + | float player_localnum; //the playernum<br> |
− | float maxclients; //a constant filled in by the engine | + | float maxclients; //a constant filled in by the engine<br> |
− | + | <br> | |
− | float clientcommandframe; //player movement | + | float clientcommandframe; //player movement<br> |
− | float servercommandframe; //clientframe echoed off the server | + | float servercommandframe; //clientframe echoed off the server<br> |
− | string mapname; | + | string mapname;<br> |
− | + | <br> | |
− | // | + | //<br> |
− | // global variables set by built in functions | + | // global variables set by built in functions<br> |
− | // | + | //<br> |
− | vector v_forward, v_up, v_right; // set by makevectors() | + | vector v_forward, v_up, v_right; // set by makevectors()<br> |
− | + | <br> | |
− | // set by traceline / tracebox | + | // set by traceline / tracebox<br> |
− | float trace_allsolid; | + | float trace_allsolid;<br> |
− | float trace_startsolid; | + | float trace_startsolid;<br> |
− | float trace_fraction; | + | float trace_fraction;<br> |
− | vector trace_endpos; | + | vector trace_endpos;<br> |
− | vector trace_plane_normal; | + | vector trace_plane_normal;<br> |
− | float trace_plane_dist; | + | float trace_plane_dist;<br> |
− | entity trace_ent; | + | entity trace_ent;<br> |
− | float trace_inopen; | + | float trace_inopen;<br> |
− | float trace_inwater; | + | float trace_inwater;<br> |
− | + | <br> | |
− | // | + | //<br> |
− | // required prog functions | + | // required prog functions<br> |
− | // | + | //<br> |
− | void() CSQC_Init; | + | void() CSQC_Init;<br> |
− | void() CSQC_Shutdown; | + | void() CSQC_Shutdown;<br> |
− | float(float f, float t | + | float(float f, float t) CSQC_InputEvent;<br> |
− | void() CSQC_UpdateView; | + | void() CSQC_UpdateView;<br> |
− | float(string s) CSQC_ConsoleCommand; | + | float(string s) CSQC_ConsoleCommand;<br> |
− | + | <br> | |
− | //these fields are read and set by the default player physics | + | //these fields are read and set by the default player physics<br> |
− | vector pmove_org; | + | vector pmove_org;<br> |
− | vector pmove_vel; | + | vector pmove_vel;<br> |
− | vector pmove_mins; | + | vector pmove_mins;<br> |
− | vector pmove_maxs; | + | vector pmove_maxs;<br> |
− | //retrieved from the current movement commands (read by player physics) | + | //retrieved from the current movement commands (read by player physics)<br> |
− | float input_timelength; | + | float input_timelength;<br> |
− | vector input_angles; | + | vector input_angles;<br> |
− | vector input_movevalues; //forwards, right, up. | + | vector input_movevalues; //forwards, right, up.<br> |
− | float input_buttons; //attack, use, jump (default physics only uses jump) | + | float input_buttons; //attack, use, jump (default physics only uses jump)<br> |
− | + | <br> | |
− | float movevar_gravity; | + | float movevar_gravity;<br> |
− | float movevar_stopspeed; | + | float movevar_stopspeed;<br> |
− | float movevar_maxspeed; | + | float movevar_maxspeed;<br> |
− | float movevar_spectatormaxspeed; //used by NOCLIP movetypes. | + | float movevar_spectatormaxspeed; //used by NOCLIP movetypes.<br> |
− | float movevar_accelerate; | + | float movevar_accelerate;<br> |
− | float movevar_airaccelerate; | + | float movevar_airaccelerate;<br> |
− | float movevar_wateraccelerate; | + | float movevar_wateraccelerate;<br> |
− | float movevar_friction; | + | float movevar_friction;<br> |
− | float movevar_waterfriction; | + | float movevar_waterfriction;<br> |
− | float movevar_entgravity; //the local player's gravity field. Is a multiple | + | float movevar_entgravity; //the local player's gravity field. Is a multiple (1 is the normal value)<br> |
− | + | </code> | |
− | </ | ||
− | |||
==System Fields== | ==System Fields== | ||
− | < | + | <code> |
− | .float modelindex; // *** model index in the precached list | + | .float modelindex; // *** model index in the precached list<br> |
− | .vector absmin, absmax; // *** origin + mins / maxs | + | .vector absmin, absmax; // *** origin + mins / maxs<br> |
− | + | <br> | |
− | .float entnum; // *** the ent number as on the server | + | .float entnum; // *** the ent number as on the server<br> |
− | .float drawmask; | + | .float drawmask;<br> |
− | .void() predraw; | + | .void() predraw;<br> |
− | .float movetype; | + | .float movetype;<br> |
− | .float solid; | + | .float solid;<br> |
− | + | <br> | |
− | .vector origin; // *** | + | .vector origin; // ***<br> |
− | .vector oldorigin; // *** | + | .vector oldorigin; // ***<br> |
− | .vector velocity; | + | .vector velocity;<br> |
− | .vector angles; | + | .vector angles;<br> |
− | .vector avelocity; | + | .vector avelocity;<br> |
− | + | <br> | |
− | .string classname; // spawn function | + | .string classname; // spawn function<br> |
− | .string model; | + | .string model;<br> |
− | .float frame; | + | .float frame;<br> |
− | .float skin; | + | .float skin;<br> |
− | .float effects; | + | .float effects;<br> |
− | + | <br> | |
− | .vector mins, maxs; // bounding box extents reletive to origin | + | .vector mins, maxs; // bounding box extents reletive to origin<br> |
− | .vector size; // maxs - mins | + | .vector size; // maxs - mins<br> |
− | + | <br> | |
− | .void() touch; | + | .void() touch;<br> |
− | .void() use; | + | .void() use;<br> |
− | .void() think; | + | .void() think;<br> |
− | .void() blocked; // for doors or plats, called when can't push other | + | .void() blocked; // for doors or plats, called when can't push other<br> |
− | + | <br> | |
− | .float nextthink; | + | .float nextthink;<br> |
− | .entity chain; | + | .entity chain;<br> |
− | .string netname; | + | .string netname;<br> |
− | .entity enemy; | + | .entity enemy;<br> |
− | .float flags; | + | .float flags;<br> |
− | .float colormap; | + | .float colormap;<br> |
− | .entity owner; | + | .entity owner;<br> |
− | </ | + | </code> |
==Builtins== | ==Builtins== | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |