tighter bsp model culling.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3923 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2011-11-09 04:14:38 +00:00
parent 119c9c412c
commit 790052a28e

View file

@ -1939,6 +1939,18 @@ qboolean R_CullEntityBox(entity_t *e, vec3_t modmins, vec3_t modmaxs)
#if 1
float mrad = 0, v;
static vec3_t identaxis[3] = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}};
if (!memcmp(e->axis, identaxis, sizeof(identaxis)))
{
for (i = 0; i < 3; i++)
{
wmin[i] = e->origin[i]+modmins[i];
wmax[i] = e->origin[i]+modmaxs[i];
}
}
else
{
for (i = 0; i < 3; i++)
{
v = fabs(modmins[i]);
@ -1953,6 +1965,7 @@ qboolean R_CullEntityBox(entity_t *e, vec3_t modmins, vec3_t modmaxs)
wmin[i] = e->origin[i]-mrad;
wmax[i] = e->origin[i]+mrad;
}
}
#else
float fmin, fmax;