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;<br>
+
entity self;
entity other;<br>
+
entity other;
entity world;<br>
+
entity world;
float time;<br>
+
float time;
float frametime;<br>
+
float frametime;
<br>
+
 
float player_localentnum;    //the entnum<br>
+
float player_localentnum;    //the entnum
float player_localnum;        //the playernum<br>
+
float player_localnum;        //the playernum
float maxclients;            //a constant filled in by the engine<br>
+
float maxclients;            //a constant filled in by the engine
<br>
+
 
float clientcommandframe;    //player movement<br>
+
float clientcommandframe;    //player movement
float servercommandframe;    //clientframe echoed off the server<br>
+
float servercommandframe;    //clientframe echoed off the server
string mapname;<br>
+
string mapname;
<br>
+
 
//<br>
+
//
// global variables set by built in functions<br>
+
// global variables set by built in functions
//<br>
+
//
vector v_forward, v_up, v_right;  // set by makevectors()<br>
+
vector v_forward, v_up, v_right;  // set by makevectors()
<br>
+
 
// set by traceline / tracebox<br>
+
// set by traceline / tracebox
float trace_allsolid;<br>
+
float trace_allsolid;
float trace_startsolid;<br>
+
float trace_startsolid;
float trace_fraction;<br>
+
float trace_fraction;
vector trace_endpos;<br>
+
vector trace_endpos;
vector trace_plane_normal;<br>
+
vector trace_plane_normal;
float trace_plane_dist;<br>
+
float trace_plane_dist;
entity trace_ent;<br>
+
entity trace_ent;
float trace_inopen;<br>
+
float trace_inopen;
float trace_inwater;<br>
+
float trace_inwater;
<br>
+
 
//<br>
+
//
// required prog functions<br>
+
// required prog functions
//<br>
+
//
void() CSQC_Init;<br>
+
void() CSQC_Init;
void() CSQC_Shutdown;<br>
+
void() CSQC_Shutdown;
float(float f, float t) CSQC_InputEvent;<br>
+
float(float f, float t) CSQC_InputEvent;
void() CSQC_UpdateView;<br>
+
void() CSQC_UpdateView;
float(string s) CSQC_ConsoleCommand;<br>
+
float(string s) CSQC_ConsoleCommand;
<br>
+
 
//these fields are read and set by the default player physics<br>
+
//these fields are read and set by the default player physics
vector pmove_org;<br>
+
vector pmove_org;
vector pmove_vel;<br>
+
vector pmove_vel;
vector pmove_mins;<br>
+
vector pmove_mins;
vector pmove_maxs;<br>
+
vector pmove_maxs;
//retrieved from the current movement commands (read by player physics)<br>
+
//retrieved from the current movement commands (read by player physics)
float input_timelength;<br>
+
float input_timelength;
vector input_angles;<br>
+
vector input_angles;
vector input_movevalues;  //forwards, right, up.<br>
+
vector input_movevalues;  //forwards, right, up.
float input_buttons;    //attack, use, jump (default physics only uses jump)<br>
+
float input_buttons;    //attack, use, jump (default physics only uses jump)
<br>
+
 
float movevar_gravity;<br>
+
float movevar_gravity;
float movevar_stopspeed;<br>
+
float movevar_stopspeed;
float movevar_maxspeed;<br>
+
float movevar_maxspeed;
float movevar_spectatormaxspeed;  //used by NOCLIP movetypes.<br>
+
float movevar_spectatormaxspeed;  //used by NOCLIP movetypes.
float movevar_accelerate;<br>
+
float movevar_accelerate;
float movevar_airaccelerate;<br>
+
float movevar_airaccelerate;
float movevar_wateraccelerate;<br>
+
float movevar_wateraccelerate;
float movevar_friction;<br>
+
float movevar_friction;
float movevar_waterfriction;<br>
+
float movevar_waterfriction;
float movevar_entgravity; //the local player's gravity field. Is a multiple (1 is the normal value)<br>
+
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<br>
+
.float modelindex;    // *** model index in the precached list
.vector absmin, absmax; // *** origin + mins / maxs<br>
+
.vector absmin, absmax; // *** origin + mins / maxs
<br>
+
 
.float entnum;        // *** the ent number as on the server<br>
+
.float entnum;        // *** the ent number as on the server
.float drawmask;<br>
+
.float drawmask;
.void() predraw;<br>
+
.void() predraw;
.float movetype;<br>
+
.float movetype;
.float solid;<br>
+
.float solid;
<br>
+
 
.vector origin;        // ***<br>
+
.vector origin;        // ***
.vector oldorigin;      // ***<br>
+
.vector oldorigin;      // ***
.vector velocity;<br>
+
.vector velocity;
.vector angles;<br>
+
.vector angles;
.vector avelocity;<br>
+
.vector avelocity;
<br>
+
 
.string classname;      // spawn function<br>
+
.string classname;      // spawn function
.string model;<br>
+
.string model;
.float frame;<br>
+
.float frame;
.float skin;<br>
+
.float skin;
.float effects;<br>
+
.float effects;
<br>
+
 
.vector mins, maxs;    // bounding box extents reletive to origin<br>
+
.vector mins, maxs;    // bounding box extents reletive to origin
.vector size;          // maxs - mins<br>
+
.vector size;          // maxs - mins
<br>
+
 
.void() touch;<br>
+
.void() touch;
.void() use;<br>
+
.void() use;
.void() think;<br>
+
.void() think;
.void() blocked;        // for doors or plats, called when can't push other<br>
+
.void() blocked;        // for doors or plats, called when can't push other
<br>
+
 
.float nextthink;<br>
+
.float nextthink;
.entity chain;<br>
+
.entity chain;
.string netname;<br>
+
.string netname;
.entity enemy;<br>
+
.entity enemy;
.float flags;<br>
+
.float flags;
.float colormap;<br>
+
.float colormap;
.entity owner;<br>
+
.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;

Builtins