From 274614964f8b1a6fb0eac73eed6c21af84cefb4a Mon Sep 17 00:00:00 2001 From: cholleme <> Date: Wed, 25 Jun 2003 09:18:55 +0000 Subject: [PATCH] Fixed bug with monster collisions --- sv_q3support.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/sv_q3support.c b/sv_q3support.c index d797e9b..249894f 100644 --- a/sv_q3support.c +++ b/sv_q3support.c @@ -56,7 +56,7 @@ void CM_InitBoxHull (model_t *M) box_brush = &M->brushes[M->numbrushes]; box_brush->numsides = 6; box_brush->firstbrushside = M->numbrushsides; - box_brush->contents = CONTENTS_EMPTY; + box_brush->contents = CONTENTS_SOLID; for (i=0 ; i<6 ; i++) { @@ -453,6 +453,10 @@ void CM_ClipBoxToBrush (model_t *M, vec3_t mins, vec3_t maxs, vec3_t p1, vec3_t trace->allsolid = true; return; } + + /*if (getout || startout)*/ trace->inopen = true; + + if (enterfrac < leavefrac) { if (enterfrac > -1 && enterfrac < trace->fraction) @@ -512,8 +516,10 @@ void CM_TestBoxInBrush (model_t *M, vec3_t mins, vec3_t maxs, vec3_t p1, d1 = DotProduct (p1, plane->normal) - dist; // if completely in front of face, no intersection - if (d1 > 0) + if (d1 > 0) { + trace->inopen = true; return; + } } @@ -591,7 +597,6 @@ void CM_TraceToBrushModel (model_t *M, int firstbrush, int numbrushes, vec3_t mi //Con_Printf("CM_TraceToBrushModel"); - if (!M->numnodes) // map not loaded return; trace_contents = brushmask;