djcev.com

//

Git Repos / fte_dogmode / qc / defs_globals.qc

Last update to this file was on 2024-03-24 at 02:40.

Show defs_globals.qc

//==============================================================================
// SOURCE FOR GLOBALVARS_T C STRUCTURE
//==============================================================================

//======================================================================
// system globals
//======================================================================
entity self;
entity other;
entity world;
float time;
float frametime;

// force all entities to touch triggers next frame. this is needed because
// non-moving things don't normally scan for triggers, and when a trigger is
// created (like a teleport trigger), it needs to catch everything.
// decremented each frame, so set to 2 to guarantee everything is touched.
float force_retouch;

string mapname;

float deathmatch;
float coop;
float teamplay;

float serverflags; // propagated from level to level, used
// to keep track of completed episodes
float total_secrets;
float total_monsters;

float found_secrets; // number of secrets found
float killed_monsters; // number of monsters killed

// spawnparms are used to encode information about clients across server
// level changes
float parm1, parm2, parm3, parm4, parm5, parm6, parm7, parm8,
parm9, parm10, parm11, parm12, parm13, parm14, parm15, parm16;

//======================================================================
// global variables set by built in functions
//======================================================================
vector v_forward, v_up, v_right; // set by makevectors()

// set by traceline / tracebox // comments below copied from AD
float trace_allsolid; // both start and end were in a solid
float trace_startsolid; // the start point was in a solid
float trace_fraction; // how much of the vector (% from 0 to 1
// was traced before it hit something
vector trace_endpos; // the final position
vector trace_plane_normal; // the normal of the surface it hit
float trace_plane_dist; // used for angled surfaces (?)
entity trace_ent; // the entity it hit (world if nothing)
float trace_inopen; // if some portion of the trace is
// in the air
float trace_inwater; // if some portion of the trace is
// in water

entity msg_entity; // destination of single entity writes

//======================================================================
// required prog functions
//======================================================================
void() main; // only for testing

void() StartFrame;

void() PlayerPreThink;
void() PlayerPostThink;

void() ClientKill;
void() ClientConnect;
void() PutClientInServer; // call after setting the parm1... parms
void() ClientDisconnect;

void() SetNewParms; // called when a client first connects
// to a server. set parms so they can be
// saved off for restarts

void() SetChangeParms; // call to set parms for self so they
// can be saved for a level transition

//======================================================================
void end_sys_globals; // flag for structure dumping
//======================================================================

Return to the top of this page or return to the overview of this repo.

Log defs_globals.qc

Date Commit Message Author + -
2024-03-24 2nd pass refactor, rework QC class structure cev +84  

Return to the top of this page or return to the overview of this repo.