sort-of merge world.h and (mostly: Sys/Con vs SV) world.c this winds up

bringing rotated bboxes into nq :)
This commit is contained in:
Bill Currie 2001-08-27 22:16:11 +00:00
parent 3edd4550d2
commit 74dfef5cd1
7 changed files with 404 additions and 90 deletions

View file

@ -47,14 +47,10 @@
#include "world.h"
/*
entities never clip against themselves, or their owner
line of sight checks trace->crosscontent, but bullets don't
entities never clip against themselves, or their owner
line of sight checks trace->crosscontent, but bullets don't
*/
typedef struct {
vec3_t boxmins, boxmaxs; // enclose the test object along
// entire move
@ -67,7 +63,6 @@ typedef struct {
edict_t *passedict;
} moveclip_t;
int SV_HullPointContents (hull_t *hull, int num, vec3_t p);
/*
@ -463,6 +458,18 @@ SV_HullPointContents (hull_t *hull, int num, vec3_t p)
int
SV_PointContents (vec3_t p)
{
int cont;
cont = SV_HullPointContents (&sv.worldmodel->hulls[0], 0, p);
if (cont <= CONTENTS_CURRENT_0 && cont >= CONTENTS_CURRENT_DOWN)
cont = CONTENTS_WATER;
return cont;
}
int
SV_TruePointContents (vec3_t p)
{
return SV_HullPointContents (&sv.worldmodel->hulls[0], 0, p);
}
@ -471,6 +478,7 @@ SV_PointContents (vec3_t p)
/*
SV_TestEntityPosition
This could be a lot more efficient...
A small wrapper around SV_BoxInSolidEntity that never clips against the
supplied entity.
*/
@ -817,8 +825,8 @@ SV_TestPlayerPosition (edict_t *ent, vec3_t origin)
{
hull_t *hull;
edict_t *check;
vec3_t boxmins, boxmaxs;
vec3_t offset;
vec3_t boxmins, boxmaxs;
vec3_t offset;
int e;
// check world first
@ -858,7 +866,8 @@ SV_TestPlayerPosition (edict_t *ent, vec3_t origin)
// test the point
if (SV_HullPointContents (hull, hull->firstclipnode, offset) !=
CONTENTS_EMPTY) return check;
CONTENTS_EMPTY)
return check;
}
return NULL;