mirror of
https://github.com/nzp-team/quakec.git
synced 2025-02-16 17:10:55 +00:00
HANDHELD: fix defs
This commit is contained in:
parent
42c7edc89c
commit
ec268bebb2
1 changed files with 465 additions and 389 deletions
|
@ -40,6 +40,7 @@ float trace_plane_dist;
|
|||
entity trace_ent;
|
||||
float trace_inopen;
|
||||
float trace_inwater;
|
||||
|
||||
entity msg_entity; // destination of single entity writes
|
||||
void() main; // only for testing
|
||||
void() StartFrame;
|
||||
|
@ -159,112 +160,128 @@ void end_sys_fields; // flag for structure du
|
|||
// End. Lines below this MAY be altered, to some extent
|
||||
|
||||
// Built In functions
|
||||
void (vector ang) makevectors = #1; // sets v_forward, etc globals
|
||||
void (entity e, vector o) setorigin = #2;
|
||||
void (entity e, string m) setmodel = #3; // set movetype and solid first
|
||||
void (entity e, vector min, vector max) setsize = #4;
|
||||
void () break = #6;
|
||||
float () random = #7; // returns 0 - 1
|
||||
void (entity e, float chan, string samp, float vol, float atten) sound = #8;
|
||||
vector (vector v) normalize = #9;
|
||||
void (string e) error = #10;
|
||||
void (string e) objerror = #11;
|
||||
float (vector v) vlen = #12;
|
||||
float (vector v) vectoyaw = #13;
|
||||
entity () spawn = #14;
|
||||
void (entity e) remove = #15;
|
||||
void (vector v1, vector v2, float nomonsters, entity forent) traceline = #16;
|
||||
entity () checkclient = #17; // returns a client to look for
|
||||
entity (entity start, .string fld, string match) find = #18;
|
||||
string (string s) precache_sound = #19;
|
||||
string (string s) precache_model = #20;
|
||||
void (entity client, string s) stuffcmd = #21;
|
||||
entity (vector org, float rad) findradius = #22;
|
||||
void (string s) bprint_psp = #23;
|
||||
void (entity client, string s) sprint_psp = #24;
|
||||
void (string s) dprint = #25;
|
||||
string (float f) ftos = #26;
|
||||
string (vector v) vtos = #27;
|
||||
void () coredump = #28; // prints all edicts
|
||||
void () traceon = #29; // turns statment trace on
|
||||
void () traceoff = #30;
|
||||
void (entity e) eprint = #31; // prints an entire edict
|
||||
float (float yaw, float dist) walkmove = #32; // returns TRUE or FALSE
|
||||
float (entity zombie, float which, entity limb) updateLimb = #33;
|
||||
float (float yaw, float dist) droptofloor = #34; // TRUE if landed on floor
|
||||
void (float style, string value) lightstyle = #35;
|
||||
float (float v) rint = #36; // round to nearest int
|
||||
float (float v) floor = #37; // largest integer <= v
|
||||
float (float v) ceil = #38; // smallest integer >= v
|
||||
float (entity e) checkbottom = #40; // true if self is on ground
|
||||
float (vector v) pointcontents = #41; // returns a CONTENT_*
|
||||
float (float f) fabs = #43;
|
||||
vector (entity e, float speed) aim = #44; // returns the shooting vector
|
||||
float (string s) cvar = #45; // return cvar.value
|
||||
void (string s) localcmd = #46; // put string into local que
|
||||
entity (entity e) nextent = #47; // for looping through all ents
|
||||
void (vector o, vector d, float color, float count) particle = #48; // start a particle effect
|
||||
void () ChangeYaw = #49; // turn towards self.ideal_yaw
|
||||
float (string name) getSoundLen = #50;
|
||||
vector (vector v) vectoangles = #51;
|
||||
void (float to, float f) WriteByte = #52;
|
||||
void (float to, float f) WriteChar = #53;
|
||||
void (float to, float f) WriteShort = #54;
|
||||
void (float to, float f) WriteLong = #55;
|
||||
void (float to, float f) WriteCoord = #56;
|
||||
void (float to, float f) WriteAngle = #57;
|
||||
void (float to, string s) WriteString = #58;
|
||||
void (float to, entity s) WriteEntity = #59;
|
||||
string (entity s) etos = #65;
|
||||
void (float step) movetogoal = #67;
|
||||
string (string s) precache_file = #68; // no effect except for -copy
|
||||
void (entity e) makestatic = #69;
|
||||
void (string s) changelevel = #70;
|
||||
void (float step, vector origin) movetoorigin = #71;
|
||||
void (string var, string val) cvar_set = #72; // sets cvar.value
|
||||
void (entity client, string s) centerprint = #73; // sprint, but in middle
|
||||
void (entity client, string s, string s) centerprint2 = #73;
|
||||
void (entity client, string s, string s, string s) centerprint3 = #73;
|
||||
void (entity client, string s, string s, string s, string s) centerprint4 = #73;
|
||||
void (entity client, string s, string s, string s, string s, string s) centerprint5 = #73;
|
||||
void (entity client, string s, string s, string s, string s, string s, string s) centerprint6 = #73;
|
||||
void (entity client, string s, string s, string s, string s, string s, string s, string s) centerprint7 = #73;
|
||||
void (vector pos, string samp, float vol, float atten) ambientsound = #74;
|
||||
string (string s) precache_model2 = #75; // registered version only
|
||||
string (string s) precache_sound2 = #76; // registered version only
|
||||
string (string s) precache_file2 = #77; // registered version only
|
||||
void (entity e) setspawnparms = #78; // set parm1... to the
|
||||
void (entity plr, float achievement) achievement = #79;
|
||||
float (string s) stof = #81; // 2001-09-20 QuakeC string manipulation by FrikaC
|
||||
vector (entity what) Get_Waypoint_Near = #83;
|
||||
float (entity zombie, entity target) Do_Pathfind_psp = #84;
|
||||
void (string s) Open_Waypoint = #85;
|
||||
vector (entity zombie,vector start,vector min, vector max) Get_Next_Waypoint = #86;
|
||||
void (entity client, float type, float cost, float weapon) useprint = #87;
|
||||
vector (entity zombie,vector start,vector min, vector max) Get_First_Waypoint = #88;
|
||||
void (string s) Close_Waypoint = #89;
|
||||
void (vector start, vector min, vector max, vector end, float nomonsters, entity forent) tracebox = #90;
|
||||
void(vector ang) makevectors = #1; // sets v_forward, etc globals
|
||||
void(entity e, vector o) setorigin = #2;
|
||||
void(entity e, string m) setmodel = #3; // set movetype and solid first
|
||||
void(entity e, vector min, vector max) setsize = #4;
|
||||
void() break = #6;
|
||||
float() random = #7; // returns 0 - 1
|
||||
void(entity e, float chan, string samp, float vol, float atten) sound = #8;
|
||||
vector(vector v) normalize = #9;
|
||||
void(string e) error = #10;
|
||||
void(string e) objerror = #11;
|
||||
float(vector v) vlen = #12;
|
||||
float(vector v) vectoyaw = #13;
|
||||
entity() spawn = #14;
|
||||
void(entity e) remove = #15;
|
||||
void(vector v1, vector v2, float nomonsters, entity forent) traceline = #16;
|
||||
entity() checkclient = #17; // returns a client to look for
|
||||
entity(entity start, .string fld, string match) find = #18;
|
||||
string(string s) precache_sound = #19;
|
||||
string(string s) precache_model = #20;
|
||||
void(entity client, string s)stuffcmd = #21;
|
||||
entity(vector org, float rad) findradius = #22;
|
||||
void(string s) dprint = #25;
|
||||
string(float f) ftos = #26;
|
||||
string(vector v) vtos = #27;
|
||||
void() coredump = #28; // prints all edicts
|
||||
void() traceon = #29; // turns statment trace on
|
||||
void() traceoff = #30;
|
||||
void(entity e) eprint = #31; // prints an entire edict
|
||||
float(float yaw, float dist) walkmove = #32; // returns TRUE or FALSE
|
||||
float(entity zombie, float which, entity limb) updateLimb = #33;
|
||||
float(float yaw, float dist) droptofloor = #34; // TRUE if landed on floor
|
||||
void(float style, string value) lightstyle = #35;
|
||||
float(float v) rint = #36; // round to nearest int
|
||||
float(float v) floor = #37; // largest integer <= v
|
||||
float(float v) ceil = #38; // smallest integer >= v
|
||||
float(entity e) checkbottom = #40; // true if self is on ground
|
||||
float(vector v) pointcontents = #41; // returns a CONTENT_*
|
||||
float(float f) fabs = #43;
|
||||
vector(entity e, float speed) aim = #44; // returns the shooting vector
|
||||
float(string s) cvar = #45; // return cvar.value
|
||||
void(string s) localcmd = #46; // put string into local que
|
||||
entity(entity e) nextent = #47; // for looping through all ents
|
||||
void() ChangeYaw = #49; // turn towards self.ideal_yaw
|
||||
float(string name) getSoundLen = #50;
|
||||
vector(vector v) vectoangles = #51;
|
||||
void(float to, float f) WriteByte = #52;
|
||||
void(float to, float f) WriteChar = #53;
|
||||
void(float to, float f) WriteShort = #54;
|
||||
void(float to, float f) WriteLong = #55;
|
||||
void(float to, float f) WriteCoord = #56;
|
||||
void(float to, float f) WriteAngle = #57;
|
||||
void(float to, string s) WriteString = #58;
|
||||
void(float to, entity s) WriteEntity = #59;
|
||||
string(entity s) etos = #65;
|
||||
void(float step) movetogoal = #67;
|
||||
string(string s) precache_file = #68; // no effect except for -copy
|
||||
void(entity e) makestatic = #69;
|
||||
void(string s) changelevel = #70;
|
||||
void(float step, vector origin) movetoorigin = #71;
|
||||
void(string var, string val) cvar_set = #72; // sets cvar.value
|
||||
void(entity client, string s) centerprint = #73; // sprint, but in middle
|
||||
void(entity client, string s, string s) centerprint2 = #73;
|
||||
void(entity client, string s, string s, string s) centerprint3 = #73;
|
||||
void(entity client, string s, string s, string s, string s) centerprint4 = #73;
|
||||
void(entity client, string s, string s, string s, string s, string s) centerprint5 = #73;
|
||||
void(entity client, string s, string s, string s, string s, string s, string s) centerprint6 = #73;
|
||||
void(entity client, string s, string s, string s, string s, string s, string s, string s) centerprint7 = #73;
|
||||
void(vector pos, string samp, float vol, float atten) ambientsound = #74;
|
||||
string(string s) precache_model2 = #75; // registered version only
|
||||
string(string s) precache_sound2 = #76; // registered version only
|
||||
string(string s) precache_file2 = #77; // registered version only
|
||||
void(entity e) setspawnparms = #78; // set parm1... to the
|
||||
void(vector start, vector min, vector max, vector end, float nomonsters, entity forent) tracebox = #90;
|
||||
float(vector start, vector min, vector max, vector end, float nomonsters, entity forent) tracemove = #99;
|
||||
entity (entity start, .float field, float match) findfloat = #98;
|
||||
float (vector start, vector min, vector max, vector end, float nomonsters, entity forent) tracemove = #99;
|
||||
float(string s) stof = #81; // 2001-09-20 QuakeC string manipulation by FrikaC
|
||||
vector(entity what) Get_Waypoint_Near = #83;
|
||||
float(entity zombie, entity target) Do_Pathfind_psp = #84;
|
||||
void(string s) Open_Waypoint = #85;
|
||||
vector(entity zombie,vector start,vector min, vector max) Get_Next_Waypoint = #86;
|
||||
void(entity client, float type, float cost, float weapon) useprint = #87;
|
||||
vector(entity zombie,vector start,vector min, vector max) Get_First_Waypoint = #88;
|
||||
void(string s) Close_Waypoint = #89;
|
||||
|
||||
void(entity plr, float achievement) achievement = #79;
|
||||
|
||||
void(string trackname) songegg = #500;
|
||||
void() nzp_maxammo = #501;
|
||||
/*
|
||||
type 0 = clear
|
||||
type 1 = buy door
|
||||
type 2 = buy debris
|
||||
type 3 = Buy ammo
|
||||
type 4 = buy weapon
|
||||
type 5 = repair window
|
||||
type 6 = use box
|
||||
type 7 = use trap
|
||||
type 8 = require power
|
||||
*/
|
||||
|
||||
|
||||
// 2001-09-20 QuakeC file access by FrikaC start
|
||||
float (string filename, float mode) fopen = #110;
|
||||
void (float fhandle) fclose = #111;
|
||||
string (float fhandle) fgets = #112;
|
||||
void (float fhandle, string s) fputs = #113;
|
||||
float (string s) strlen = #114;
|
||||
string (string s1, string s2) strcat = #115;
|
||||
string (string s, float start, float length) substring = #116;
|
||||
vector (string s) stov = #117;
|
||||
string (string s) strzone = #118;
|
||||
string (string s) strunzone = #119;
|
||||
string (string s) strtrim = #120;
|
||||
float(string filename, float mode) fopen = #110;
|
||||
void(float fhandle) fclose = #111;
|
||||
string(float fhandle) fgets = #112;
|
||||
void(float fhandle, string s) fputs = #113;
|
||||
// 2001-09-20 QuakeC file access by FrikaC end
|
||||
|
||||
// 2001-09-20 QuakeC string manipulation by FrikaC start
|
||||
float(string s) strlen = #114;
|
||||
string(string s1, string s2) strcat = #115;
|
||||
string(string s, float start, float length) substring = #116;
|
||||
vector(string s) stov = #117;
|
||||
string(string s) strzone = #118;
|
||||
string(string s) strunzone = #119;
|
||||
string(string s) strtrim = #120;
|
||||
// 2001-09-20 QuakeC string manipulation by FrikaC end
|
||||
|
||||
// 2001-11-15 DarkPlaces general builtin functions by Lord Havoc start
|
||||
float(string s) tokenize = #441;
|
||||
string(float num) argv = #442;
|
||||
// 2001-11-15 DarkPlaces general builtin functions by Lord Havoc end
|
||||
void (string trackname) songegg = #500;
|
||||
void () nzp_maxammo = #501;
|
||||
|
||||
//
|
||||
// constants
|
||||
|
@ -285,6 +302,7 @@ void ()
|
|||
#define FL_ONGROUND 512 // standing on something
|
||||
#define FL_PARTIALGROUND 1024 // not all corners are valid
|
||||
#define FL_WATERJUMP 2048 // player jumping out of water
|
||||
//#define FL_JUMPRELEASED 4096 // for jump debouncing
|
||||
|
||||
// edict.movetype values
|
||||
#define MOVETYPE_NONE 0 // never moves
|
||||
|
@ -301,8 +319,6 @@ void ()
|
|||
#define MOVETYPE_BOUNCEMISSILE 11 // bounce with extra size
|
||||
#define MOVETYPE_FOLLOW 12
|
||||
|
||||
#define MOVE_HITMODEL 0
|
||||
|
||||
// edict.solid values
|
||||
#define SOLID_NOT 0 // no interaction with other objects
|
||||
#define SOLID_TRIGGER 1 // touch on edge, but not blocking
|
||||
|
@ -318,18 +334,29 @@ void ()
|
|||
#define RANGE_FAR 3
|
||||
|
||||
// deadflag values
|
||||
|
||||
#define DEAD_NO 0
|
||||
#define DEAD_DYING 1
|
||||
#define DEAD_DEAD 2
|
||||
#define DEAD_RESPAWNABLE 3
|
||||
|
||||
// takedamage values
|
||||
|
||||
#define DAMAGE_NO 0
|
||||
#define DAMAGE_YES 1
|
||||
#define DAMAGE_AIM 2
|
||||
#define DAMAGE_NOMARKER 3
|
||||
|
||||
/*.void() th_stand;
|
||||
.void() th_walk;
|
||||
.void() th_run;
|
||||
.void(entity attacker, float damage) th_pain;*/
|
||||
.void() th_die;
|
||||
//.void() th_missile;
|
||||
.void() th_melee;
|
||||
|
||||
// point content values
|
||||
|
||||
#define CONTENT_EMPTY -1
|
||||
#define CONTENT_SOLID -2
|
||||
#define CONTENT_WATER -3
|
||||
|
@ -337,17 +364,24 @@ void ()
|
|||
#define CONTENT_LAVA -5
|
||||
#define CONTENT_SKY -6
|
||||
|
||||
//doors
|
||||
#define STATE_TOP 0
|
||||
#define STATE_BOTTOM 1
|
||||
#define STATE_UP 2
|
||||
#define STATE_DOWN 3
|
||||
|
||||
#define VEC_ORIGIN '0 0 0'
|
||||
|
||||
//Standard Quake View Offset
|
||||
//vector VEC_VIEW_OFS = '0 0 22';
|
||||
|
||||
//Half Life View Offset is 64
|
||||
//64 units above ground, for our purposes it's, 64 - (how low bounding box goes)
|
||||
//vector VEC_VIEW_OFS = '0 0 32';
|
||||
|
||||
//Standard Quake Hull
|
||||
//vector VEC_HULL_MIN = '-16 -16 -24';
|
||||
//vector VEC_HULL_MAX = '16 16 32';
|
||||
|
||||
//Half Life 1 Hull Sizes ADDED BY BLUBS, COMMENTED ORIGINAL QUAKE BBOX SIZS OUT
|
||||
#define VEC_HULL_MIN '-16 -16 -32'
|
||||
#define VEC_HULL_MAX '16 16 40'
|
||||
|
||||
#define VEC_HULL2_MIN '-32 -32 -24'
|
||||
#define VEC_HULL2_MAX '32 32 64'
|
||||
|
||||
|
@ -406,12 +440,12 @@ void ()
|
|||
// sound channels
|
||||
// channel 0 never willingly overrides
|
||||
// other channels (1-7) allways override a playing sound on that channel
|
||||
// Player uses channel 5 for all weapon reload sfx
|
||||
#define CHAN_AUTO 0
|
||||
#define CHAN_WEAPON 1
|
||||
#define CHAN_VOICE 2
|
||||
#define CHAN_ITEM 3
|
||||
#define CHAN_BODY 4
|
||||
//Player uses channel 5 for all weapon reload sfx
|
||||
|
||||
#define ATTN_NONE 0
|
||||
#define ATTN_NORM 1
|
||||
|
@ -419,12 +453,14 @@ void ()
|
|||
#define ATTN_STATIC 3
|
||||
|
||||
// update types
|
||||
|
||||
#define UPDATE_GENERAL 0
|
||||
#define UPDATE_STATIC 1
|
||||
#define UPDATE_BINARY 2
|
||||
#define UPDATE_TEMP 3
|
||||
|
||||
// entity effects
|
||||
|
||||
#define EF_BLUE 1
|
||||
#define EF_MUZZLEFLASH 2
|
||||
#define EF_BRIGHTLIGHT 4
|
||||
|
@ -447,20 +483,60 @@ void ()
|
|||
#define MSG_ALL 2 // reliable to all
|
||||
#define MSG_INIT 3 // write to the init string
|
||||
|
||||
// message levels
|
||||
#define PRINT_HIGH 0
|
||||
|
||||
#define AS_STRAIGHT 1
|
||||
#define AS_SLIDING 2
|
||||
#define AS_MELEE 3
|
||||
#define AS_MISSILE 4
|
||||
|
||||
// file operations
|
||||
#define FILE_READ 0
|
||||
#define FILE_APPEND 1
|
||||
#define FILE_WRITE 2
|
||||
// Quake assumes these are defined.
|
||||
|
||||
//.string wad, map;
|
||||
.float /*worldtype,*/ delay, wait, lip, /*light_lev,*/ speed, style/*, skill*/;
|
||||
.string killtarget;
|
||||
.void() think1;
|
||||
.vector finaldest;
|
||||
.vector pos1, pos2/*, mangle*/;
|
||||
|
||||
void(vector o, vector d, float color, float count) particle = #48;// start a particle effect
|
||||
void(string s) bprint_psp = #23;
|
||||
void(entity client, string s) sprint_psp = #24;
|
||||
// End
|
||||
|
||||
void(string s) println = {bprint_psp(s);} //just when brain decided to think this is c
|
||||
void(float ignore, string s) bprint = {bprint_psp(s);};
|
||||
void(entity client, float type, string s) sprint = {sprint_psp(client, s);};
|
||||
void(string s) print = {bprint_psp(s);};
|
||||
|
||||
//doors
|
||||
.float state;
|
||||
#define STATE_TOP 0
|
||||
#define STATE_BOTTOM 1
|
||||
#define STATE_UP 2
|
||||
#define STATE_DOWN 3
|
||||
|
||||
string mappath;
|
||||
#define PRINT_HIGH 0
|
||||
|
||||
.float isspec;
|
||||
|
||||
#define FILE_READ 0
|
||||
#define FILE_APPEND 1
|
||||
#define FILE_WRITE 2
|
||||
|
||||
#define MOVE_HITMODEL 0 // must be different for this engine!
|
||||
|
||||
.float recoil_delay;
|
||||
.float gravity;
|
||||
|
||||
.float renderamt;
|
||||
.float rendermode;
|
||||
.vector rendercolor;
|
||||
.string mapversion;
|
||||
.float ammo;
|
||||
|
||||
void(string com) SV_ParseClientCommand;
|
||||
|
||||
.float currentHitBoxSetup;
|
||||
.vector bbmins, bbmaxs; // Used for zombie hitboxes
|
||||
|
||||
.float achievements;
|
||||
|
|
Loading…
Reference in a new issue