//DP_EF_RESTARTANIM_BIT
//idea: id software
-//darkplaces implementation: div0
+//darkplaces implementation: divVerent
//effects bit:
float EF_RESTARTANIM_BIT = 1048576;
//description:
//DP_EF_TELEPORT_BIT
//idea: id software
-//darkplaces implementation: div0
+//darkplaces implementation: divVerent
//effects bit:
float EF_TELEPORT_BIT = 2097152;
//description:
//DP_NULL_MODEL
//idea: Chris
-//darkplaces implementation: div0
+//darkplaces implementation: divVerent
//definitions:
//string dp_null_model = "null";
//description:
//note: atan2 can take unnormalized vectors (just like vectoyaw), and the function was included only for completeness (more often you want vectoyaw or vectoangles), atan2(v_x,v_y) * RAD2DEG gives the same result as vectoyaw(v)
//DP_QC_AUTOCVARS
-//idea: div0
-//darkplaces implementation: div0
+//idea: divVerent
+//darkplaces implementation: divVerent
//description:
//allows QC variables to be bound to cvars
//(works for float, string, vector types)
//returns the default value of a cvar, as a tempstring.
//DP_QC_CVAR_DESCRIPTION
-//idea: div0
-//DarkPlaces implementation: div0
+//idea: divVerent
+//DarkPlaces implementation: divVerent
//builtin definitions:
string(string name) cvar_description = #518;
//description:
//returns the value of a cvar, as a tempstring.
//DP_QC_CVAR_TYPE
-//idea: div0
-//DarkPlaces implementation: div0
+//idea: divVerent
+//DarkPlaces implementation: divVerent
//builtin definitions:
float(string name) cvar_type = #495;
float CVAR_TYPEFLAG_EXISTS = 1;
//prints "entity 1" or similar into a string. (this was a Q2 builtin)
//DP_QC_EXTRESPONSEPACKET
-//idea: div0
-//darkplaces implementation: div0
+//idea: divVerent
+//darkplaces implementation: divVerent
//builtin definitions:
string(void) getextresponse = #624;
//description:
//similar to find() but returns a chain of entities like findradius.
//DP_QC_FINDCHAIN_TOFIELD
-//idea: div0
-//darkplaces implementation: div0
+//idea: divVerent
+//darkplaces implementation: divVerent
//builtin definitions:
entity(.string fld, float match, .entity tofield) findradius_tofield = #22;
entity(.string fld, string match, .entity tofield) findchain_tofield = #402;
float SPA_LIGHTMAP0_COLOR = 6;
//builtin definitions:
vector(entity e, float s, float n, float a) getsurfacepointattribute = #486;
+
//description:
//function to query extended information about a point on a certain surface
//DP_QC_GETSURFACETRIANGLE
-//idea: div0
-//darkplaces implementation: div0
+//idea: divVerent
+//darkplaces implementation: divVerent
//builtin definitions:
float(entity e, float s) getsurfacenumtriangles = #628;
vector(entity e, float s, float n) getsurfacetriangle = #629;
//DP_QC_GETTAGINFO_BONEPROPERTIES
//idea: daemon
-//DarkPlaces implementation: div0
+//DarkPlaces implementation: divVerent
//global definitions:
float gettaginfo_parent;
string gettaginfo_name;
//DP_QC_GETTIME
//idea: tZork
-//darkplaces implementation: tZork, div0
+//darkplaces implementation: tZork, divVerent
//constant definitions:
float GETTIME_FRAMESTART = 0; // time of start of frame
float GETTIME_REALTIME = 1; // current time (may be OS specific)
//some timers to query...
//DP_QC_GETTIME_CDTRACK
-//idea: div0
-//darkplaces implementation: div0
+//idea: divVerent
+//darkplaces implementation: divVerent
//constant definitions:
float GETTIME_CDTRACK = 4;
//description:
//returns the playing time of the current cdtrack when passed to gettime()
//DP_QC_LOG
-//darkplaces implementation: div0
+//darkplaces implementation: divVerent
//builtin definitions:
float log(float f) = #532;
//description:
//useful math functions, sine of val, cosine of val, square root of val, and raise a to power b, respectively.
//DP_QC_SPRINTF
-//idea: div0
-//darkplaces implementation: div0
+//idea: divVerent
+//darkplaces implementation: divVerent
//builtin definitions:
string(string format, ...) sprintf = #627;
//description:
//possibly useful for parsing IPv4 addresses (such as "1.2.3.4") and IPv6 addresses (such as "[1234:5678:9abc:def0:1234:5678:9abc:def0]:26000")
//DP_QC_TOKENIZE_CONSOLE
-//idea: div0
-//darkplaces implementation: div0
+//idea: divVerent
+//darkplaces implementation: divVerent
//builtin definitions:
float(string s) tokenize_console = #514;
float(float i) argv_start_index = #515;
//allows traces to hit only world (ignoring all entities, unlike MOVE_NOMONSTERS which hits all bmodels), use as the nomonsters parameter to trace functions
//DP_QC_UNLIMITEDTEMPSTRINGS
-//idea: div0
+//idea: divVerent
//darkplaces implementation: LordHavoc
//description:
//this extension alters Quake behavior such that instead of reusing a single
//creates v_forward, v_right, and v_up vectors given a forward vector, similar to makevectors except it takes a forward direction vector instead of angles.
//DP_QC_WHICHPACK
-//idea: div0
-//darkplaces implementation: div0
+//idea: divVerent
+//darkplaces implementation: divVerent
//builtin definitions:
string(string filename) whichpack = #503;
//description:
//returns the name of the pak/pk3/whatever containing the given file, in the same path space as FRIK_FILE functions use (that is, possibly with a path name prefix)
//DP_QC_URI_ESCAPE
-//idea: div0
-//darkplaces implementation: div0
+//idea: divVerent
+//darkplaces implementation: divVerent
//URI::Escape's functionality
string(string in) uri_escape = #510;
string(string in) uri_unescape = #511;
//DP_QC_URI_GET
-//idea: div0
-//darkplaces implementation: div0
+//idea: divVerent
+//darkplaces implementation: divVerent
//loads text from an URL into a string
//returns 1 on success of initiation, 0 if there are too many concurrent
//connections already or if the URL is invalid
//this extension indicates that FTE_CSQC_SKELETONOBJECTS functionality is available in server QC (as well as CSQC).
//DP_SV_SPAWNFUNC_PREFIX
-//idea: div0
-//darkplaces implementation: div0
+//idea: divVerent
+//darkplaces implementation: divVerent
//Make functions whose name start with spawnfunc_ take precedence as spawn function for loading entities.
//Useful if you have a field ammo_shells (required in any Quake mod) but want to support spawn functions called ammo_shells (like in Q3A).
//Optionally, you can declare a global "float require_spawnfunc_prefix;" which will require ANY spawn function to start with that prefix.
// To mimic the engine's default behavior, simply call remove(self).
//DP_SV_ONENTITYPREPOSTSPAWNFUNCTION
-//idea: div0
-//darkplaces implementation: div0
+//idea: divVerent
+//darkplaces implementation: divVerent
//engine-called QC prototypes:
//void() SV_OnEntityPreSpawnFunction;
//void() SV_OnEntityPostSpawnFunction;
//this extension allows precache_model and precache_sound (and any variants) to be used during the game (with automatic messages to clients to precache the new model/sound indices), also setmodel/sound/ambientsound can be called without precaching first (they will cause an automatic precache).
//DP_SV_QCSTATUS
-//idea: div0
-//darkplaces implementation: div0
+//idea: divVerent
+//darkplaces implementation: divVerent
//1. A global variable
string worldstatus;
//Its content is set as "qcstatus" field in the rules.
//range is 0 to infinite, recommended values to try are 0.1 (very slow, 10% speed), 1 (normal speed), 5 (500% speed).
//DP_SV_WRITEPICTURE
-//idea: div0
-//darkplaces implementation: div0
+//idea: divVerent
+//darkplaces implementation: divVerent
//builtin definitions:
void(float to, string s, float sz) WritePicture = #501;
//description:
//idea: Spike, LordHavoc
//darkplaces implementation: LordHavoc
//builtin definitions:
-float(float modlindex) skel_create = #263; // create a skeleton (be sure to assign this value into .skeletonindex for use), returns skeleton index (1 or higher) on success, returns 0 on failure (for example if the modelindex is not skeletal), it is recommended that you create a new skeleton if you change modelindex.
+// all skeleton numbers are 1-based (0 being no skeleton)
+// all bone numbers are 1-based (0 being invalid)
+float(float modlindex) skel_create = #263; // create a skeleton (be sure to assign this value into .skeletonindex for use), returns skeleton index (1 or higher) on success, returns 0 on failure (for example if the modelindex is not skeletal), it is recommended that you create a new skeleton if you change modelindex, as the skeleton uses the hierarchy from the model.
float(float skel, entity ent, float modlindex, float retainfrac, float firstbone, float lastbone) skel_build = #264; // blend in a percentage of standard animation, 0 replaces entirely, 1 does nothing, 0.5 blends half, etc, and this only alters the bones in the specified range for which out of bounds values like 0,100000 are safe (uses .frame, .frame2, .frame3, .frame4, .lerpfrac, .lerpfrac3, .lerpfrac4, .frame1time, .frame2time, .frame3time, .frame4time), returns skel on success, 0 on failure
-float(float skel) skel_get_numbones = #265; // returns how many bones exist in the created skeleton
-string(float skel, float bonenum) skel_get_bonename = #266; // returns name of bone (as a tempstring)
-float(float skel, float bonenum) skel_get_boneparent = #267; // returns parent num for supplied bonenum, -1 if bonenum has no parent or bone does not exist (returned value is always less than bonenum, you can loop on this)
-float(float skel, string tagname) skel_find_bone = #268; // get number of bone with specified name, 0 on failure, tagindex (bonenum+1) on success, same as using gettagindex on the modelindex
+float(float skel) skel_get_numbones = #265; // returns how many bones exist in the created skeleton, 0 if skeleton does not exist
+string(float skel, float bonenum) skel_get_bonename = #266; // returns name of bone (as a tempstring), "" if invalid bonenum (< 1 for example) or skeleton does not exist
+float(float skel, float bonenum) skel_get_boneparent = #267; // returns parent num for supplied bonenum, 0 if bonenum has no parent or bone does not exist (returned value is always less than bonenum, you can loop on this)
+float(float skel, string tagname) skel_find_bone = #268; // get number of bone with specified name, 0 on failure, bonenum (1-based) on success, same as using gettagindex but takes modelindex instead of entity
vector(float skel, float bonenum) skel_get_bonerel = #269; // get matrix of bone in skeleton relative to its parent - sets v_forward, v_right, v_up, returns origin (relative to parent bone)
vector(float skel, float bonenum) skel_get_boneabs = #270; // get matrix of bone in skeleton in model space - sets v_forward, v_right, v_up, returns origin (relative to entity)
void(float skel, float bonenum, vector org) skel_set_bone = #271; // set matrix of bone relative to its parent, reads v_forward, v_right, v_up, takes origin as parameter (relative to parent bone)
//description:
//when a savegame is loaded, this function is called
-//XONOTIC_PLAYERMODEL
-//idea: Xonotic
+//NEXUIZ_PLAYERMODEL
+//idea: Nexuiz
//darkplaces implementation: Black
//console commands:
//playermodel <name> - FIXME: EXAMPLE NEEDED
.string playermodel; // name of player model sent by client
.string playerskin; // name of player skin sent by client
//description:
-//these client properties are used by Xonotic.
+//these client properties are used by Nexuiz.
//NXQ_GFX_LETTERBOX
//idea: nxQuake
//FTE_QC_CHECKPVS
//idea: Urre
-//darkplaces implementation: div0
+//darkplaces implementation: divVerent
//builtin definitions:
float checkpvs(vector viewpos, entity viewee) = #240;
//description:
//DP_CON_BESTWEAPON
//idea: many
-//darkplaces implementation: div0
+//darkplaces implementation: divVerent
//description:
//allows QC to register weapon properties for use by the bestweapon command, for mods that change required ammo count or type for the weapons
//it is done using console commands sent via stuffcmd:
void(float bufhandle, float string_index) bufstr_free = #469;
//DP_QC_STRINGBUFFERS_CVARLIST
-//idea: div0
-//darkplaces implementation: div0
+//idea: divVerent
+//darkplaces implementation: divVerent
//functions to list cvars and store their names into a stringbuffer
//cvars that start with pattern but not with antipattern will be stored into the buffer
void(float bufhandle, string pattern, string antipattern) buf_cvarlist = #517;
//strireplace does the same but uses case-insensitive matching of the 'search' term
//
//DP_QC_CRC16
-//idea: div0
-//darkplaces implementation: div0
+//idea: divVerent
+//darkplaces implementation: divVerent
//Some hash function to build hash tables with. This has to be be the CRC-16-CCITT that is also required for the QuakeWorld download protocol.
//When caseinsensitive is set, the CRC is calculated of the lower cased string.
float(float caseinsensitive, string s, ...) crc16 = #494;
//DP_SV_SHUTDOWN
-//idea: div0
-//darkplaces implementation: div0
+//idea: divVerent
+//darkplaces implementation: divVerent
//A function that gets called just before progs exit. To save persistent data from.
//It is not called on a crash or error.
//void SV_Shutdown();
-
-
+// EXPERIMENTAL (not finalized) EXTENSIONS:
//DP_PHYSICS
+//idea: LordHavoc
+//darkplaces implementation: LordHavoc, divVerent
+//constant definitions:
float SOLID_PHYSICS_BOX = 32;
float SOLID_PHYSICS_SPHERE = 33;
float SOLID_PHYSICS_CAPSULE = 34;
float MOVETYPE_PHYSICS = 32;
+float JOINTTYPE_POINT = 1; // point; uses origin (anchor)
+float JOINTTYPE_HINGE = 2; // hinge; uses origin (anchor) and angles (axis)
+float JOINTTYPE_SLIDER = 3; // slider; uses angles (axis)
+float JOINTTYPE_UNIVERSAL = 4; // universal; uses origin (anchor) and angles (forward is axis1, up is axis2)
+float JOINTTYPE_HINGE2 = 5; // hinge2; uses origin (anchor), angles (axis1), velocity (axis2)
+//field definitions:
.float mass;
-
-.float jointtype;
+.float jointtype; // see JOINTTYPE_ definitions above
// common joint properties:
// .entity aiment, enemy; // connected objects
// .vector movedir;
// movedir_y = -1 * max motor force to use
// movedir_z = stop position (+/-), set to 0 for no stop
// note that ODE does not support both in one anyway
-// motor properties only make sense for hinge and slider!
-
-float JOINTTYPE_POINT = 1;
-// .vector origin; // point anchor
-
-float JOINTTYPE_HINGE = 2;
-// .vector origin; // hinge anchor
-// .vector angles; // hinge axis
-
-float JOINTTYPE_SLIDER = 3;
-// .vector angles; // slider axis
-
-float JOINTTYPE_UNIVERSAL = 4;
-// .vector origin; // universal anchor
-// .vector angles; // universal axis1 and axis2 (axis1 is forward, axis2 is up)
-
-float JOINTTYPE_HINGE2 = 5;
-// .vector origin; // hinge2 anchor
-// .vector angles; // hinge2 first axis (as angles)
-// .vector velocity; // hinge2 second axis (as vector)
-
-
-
-
-
+//description:
+//various physics properties can be defined in an entity and are executed via
+//ODE