mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-31 05:00:35 +00:00
wrappers for SV_TestEntityPosition and SV_HullPointContents
This commit is contained in:
parent
bfb8eff2f0
commit
219c58bd98
1 changed files with 25 additions and 2 deletions
|
@ -1805,6 +1805,14 @@ PF_setinfokey (progs_t *pr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
PF_testentitypos (progs_t *pr)
|
||||||
|
{
|
||||||
|
edict_t *ent = G_EDICT (pr, OFS_PARM0);
|
||||||
|
RETURN_EDICT (pr, SV_TestEntityPosition (ent));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#define MAX_PF_HULLS 64 // FIXME make dynamic?
|
#define MAX_PF_HULLS 64 // FIXME make dynamic?
|
||||||
static int pf_hull_list_inited;
|
static int pf_hull_list_inited;
|
||||||
static hull_t *pf_free_hulls;
|
static hull_t *pf_free_hulls;
|
||||||
|
@ -1812,6 +1820,21 @@ static dclipnode_t pf_clipnodes[MAX_PF_HULLS][6];
|
||||||
static mplane_t pf_planes[MAX_PF_HULLS][6];
|
static mplane_t pf_planes[MAX_PF_HULLS][6];
|
||||||
hull_t pf_hull_list[MAX_PF_HULLS];
|
hull_t pf_hull_list[MAX_PF_HULLS];
|
||||||
|
|
||||||
|
static void
|
||||||
|
PF_hullpointcontents (progs_t *pr)
|
||||||
|
{
|
||||||
|
edict_t *edict = G_EDICT (pr, OFS_PARM0);
|
||||||
|
float *point = G_VECTOR (pr, OFS_PARM1);
|
||||||
|
float size = G_FLOAT (pr, OFS_PARM2);
|
||||||
|
hull_t *hull;
|
||||||
|
vec3_t offset;
|
||||||
|
static vec3_t mins; // always 0;
|
||||||
|
vec3_t maxs = {size, 0, 0};
|
||||||
|
|
||||||
|
hull = SV_HullForEntity (edict, mins, maxs, offset);
|
||||||
|
G_INT (pr, OFS_RETURN) = SV_HullPointContents (hull, 0, point);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
PF_getboxbounds (progs_t *pr)
|
PF_getboxbounds (progs_t *pr)
|
||||||
{
|
{
|
||||||
|
@ -2069,8 +2092,8 @@ builtin_t sv_builtins[] = {
|
||||||
PF_Fixme, // 89
|
PF_Fixme, // 89
|
||||||
PF_Fixme, // 90
|
PF_Fixme, // 90
|
||||||
PF_Fixme, // 91
|
PF_Fixme, // 91
|
||||||
PF_Fixme, // 92
|
PF_testentitypos, // entity (enitty ent) testentitypos = #92
|
||||||
PF_Fixme, // 93
|
PF_hullpointcontents,// integer (entity ent, vector point) hullpointcontents = #93
|
||||||
PF_getboxbounds, // vector (integer hull, integer max) getboxbounds = #94
|
PF_getboxbounds, // vector (integer hull, integer max) getboxbounds = #94
|
||||||
PF_getboxhull, // integer () getboxhull = #95
|
PF_getboxhull, // integer () getboxhull = #95
|
||||||
PF_freeboxhull, // void (integer hull) freeboxhull = #96
|
PF_freeboxhull, // void (integer hull) freeboxhull = #96
|
||||||
|
|
Loading…
Reference in a new issue