mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-26 13:50:53 +00:00
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:
parent
119c9c412c
commit
790052a28e
1 changed files with 23 additions and 10 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue