From: terencehill Date: Sun, 5 Jul 2020 13:30:52 +0000 (+0200) Subject: Use the same parameter names for traceline/tracebox builtins in all progs X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=81679e08f505fdf3c1599a5f2b3a8b3833448a7e;p=xonotic%2Fdarkplaces.git Use the same parameter names for traceline/tracebox builtins in all progs --- diff --git a/dpdefs/dpextensions.qc b/dpdefs/dpextensions.qc index 9cdeb695..5d916393 100644 --- a/dpdefs/dpextensions.qc +++ b/dpdefs/dpextensions.qc @@ -2,7 +2,7 @@ //DarkPlaces supported extension list, draft version 1.04 //definitions that id Software left out: -//these are passed as the 'nomonsters' parameter to traceline/tracebox (yes really this was supported in all quake engines, nomonsters is misnamed) +//these are passed as the 'tryents' parameter to traceline/tracebox (yes really this was supported in all quake engines) float MOVE_NORMAL = 0; // same as FALSE float MOVE_NOMONSTERS = 1; // same as TRUE float MOVE_MISSILE = 2; // save as movement with .movetype == MOVETYPE_FLYMISSILE @@ -1104,7 +1104,7 @@ float(float i) argv_end_index = #516; //idea: id Software //darkplaces implementation: id Software //builtin definitions: -void(vector v1, vector min, vector max, vector v2, float nomonsters, entity forent) tracebox = #90; +void(vector v1, vector mins, vector maxs, vector v2, float tryents, entity ignoreent) tracebox = #90; //description: //similar to traceline but much more useful, traces a box of the size specified (technical note: in quake1 and halflife bsp maps the mins and maxs will be rounded up to one of the hull sizes, quake3 bsp does not have this problem, this is the case with normal moving entities as well). @@ -1122,7 +1122,7 @@ void(entity ent, entity ignore) tracetoss = #64; //constant definitions: float MOVE_HITMODEL = 4; //description: -//allows traces to hit alias models (not sprites!) instead of entity boxes, use as the nomonsters parameter to trace functions, note that you can hit invisible model entities (alpha < 0 or EF_NODRAW or model "", it only checks modelindex) +//allows traces to hit alias models (not sprites!) instead of entity boxes, use as the tryents parameter to trace functions, note that you can hit invisible model entities (alpha < 0 or EF_NODRAW or model "", it only checks modelindex) //DP_QC_TRACE_MOVETYPE_WORLDONLY //idea: LadyHavoc @@ -1130,7 +1130,7 @@ float MOVE_HITMODEL = 4; //constant definitions: float MOVE_WORLDONLY = 3; //description: -//allows traces to hit only world (ignoring all entities, unlike MOVE_NOMONSTERS which hits all bmodels), use as the nomonsters parameter to trace functions +//allows traces to hit only world (ignoring all entities, unlike MOVE_NOMONSTERS which hits all bmodels), use as the tryents parameter to trace functions //DP_QC_UNLIMITEDTEMPSTRINGS //idea: divVerent diff --git a/dpdefs/progsdefs.qc b/dpdefs/progsdefs.qc index 2ccd8431..74e82618 100644 --- a/dpdefs/progsdefs.qc +++ b/dpdefs/progsdefs.qc @@ -414,11 +414,11 @@ entity() spawn = #14; void(entity e) remove = #15; // sets trace_* globals -// nomonsters can be: -// An entity will also be ignored for testing if forent == test, -// forent->owner == test, or test->owner == forent -// a forent of world is ignored -void(vector v1, vector v2, float nomonsters, entity forent) traceline = #16; +// An entity will also be ignored for testing if ignoreent == test, +// ignoreent->owner == test, or test->owner == ignoreent +// a ignoreent of world is ignored +// NOTE: tryents parameter used to be called nomonsters (there's also a cvar called nomonsters) +void(vector v1, vector v2, float tryents, entity ignoreent) traceline = #16; entity() checkclient = #17; // returns a client to look for entity(entity start, .string fld, string match) find = #18; diff --git a/svvm_cmds.c b/svvm_cmds.c index 4d46fd9d..74c40d5a 100644 --- a/svvm_cmds.c +++ b/svvm_cmds.c @@ -672,7 +672,7 @@ Used for use tracing and shot targeting Traces are blocked by bbox and exact bsp entityes, and also slide box entities if the tryents flag is set. -tracebox (vector1, vector mins, vector maxs, vector2, tryents) +tracebox (vector v1, vector mins, vector maxs, vector v2, float tryents, entity ignoreent) ================= */ // LadyHavoc: added this for my own use, VERY useful, similar to traceline @@ -3287,7 +3287,7 @@ NULL, // #86 (QUAKE) NULL, // #87 (QUAKE) NULL, // #88 (QUAKE) NULL, // #89 (QUAKE) -VM_SV_tracebox, // #90 void(vector v1, vector min, vector max, vector v2, float nomonsters, entity forent) tracebox (DP_QC_TRACEBOX) +VM_SV_tracebox, // #90 void(vector v1, vector mins, vector maxs, vector v2, float tryents, entity ignoreent) tracebox (DP_QC_TRACEBOX) VM_randomvec, // #91 vector() randomvec (DP_QC_RANDOMVEC) VM_SV_getlight, // #92 vector(vector org) getlight (DP_QC_GETLIGHT) VM_registercvar, // #93 float(string name, string value) registercvar (DP_REGISTERCVAR)