mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-27 06:34:11 +00:00
Remove unused R_CullBlocked.
This commit is contained in:
parent
67cef78ea2
commit
e8b36b1a71
2 changed files with 1 additions and 138 deletions
|
@ -396,13 +396,8 @@ R_DrawAliasModel (entity_t *e, qboolean cull)
|
|||
VectorAdd (currententity->origin, clmodel->mins, mins);
|
||||
VectorAdd (currententity->origin, clmodel->maxs, maxs);
|
||||
|
||||
if (cull)
|
||||
{
|
||||
if (R_CullBox (mins, maxs))
|
||||
if (cull && R_CullBox (mins, maxs))
|
||||
return;
|
||||
// if (R_CullBlocked(mins, maxs, currententity->origin))
|
||||
// return;
|
||||
}
|
||||
|
||||
// FIXME: shadecolor is supposed to be the lighting for the model, not
|
||||
// just colormod
|
||||
|
|
|
@ -503,135 +503,3 @@ R_RenderView (void)
|
|||
if (r_zgraph->int_val)
|
||||
R_ZGraph ();
|
||||
}
|
||||
|
||||
#if 0
|
||||
qboolean
|
||||
R_CullBlocked (vec3_t mins, vec3_t maxs, vec3_t org)
|
||||
{
|
||||
float rad;
|
||||
static struct trace_t trace;
|
||||
vec3_t point;
|
||||
|
||||
if (!gl_occlusion->int_val)
|
||||
return false;
|
||||
|
||||
// Check the origin first
|
||||
if ( Mod_PointInLeaf(org, cl.worldmodel)->contents != CONTENTS_SOLID)
|
||||
{
|
||||
if (SV_RecursiveHullCheck (cl.worldmodel->hulls, 0, 0, 1,
|
||||
r_refdef.vieworg, org, &trace))
|
||||
return false;
|
||||
}
|
||||
|
||||
rad = sqrt ((maxs[0] - org[0]) * (maxs[0] - org[0]) +
|
||||
(maxs[1] - org[1]) * (maxs[1] - org[1]) +
|
||||
(maxs[2] - org[2]) * (maxs[2] - org[2]));
|
||||
|
||||
// Check a few points on the bounding sphere to catch rotating objects
|
||||
// Raise the origin a bit to catch droptofloor models
|
||||
point[0] = org[0]; point[1] = org[1]+rad; point[2] = org[2]+4;
|
||||
if ( Mod_PointInLeaf(point, cl.worldmodel)->contents != CONTENTS_SOLID)
|
||||
{
|
||||
if (SV_RecursiveHullCheck (cl.worldmodel->hulls, 0, 0, 1,
|
||||
r_refdef.vieworg, point, &trace))
|
||||
return false;
|
||||
}
|
||||
point[0] = org[0]+rad; point[1] = org[1]; point[2] = org[2]+4;
|
||||
if ( Mod_PointInLeaf(point, cl.worldmodel)->contents != CONTENTS_SOLID)
|
||||
{
|
||||
if (SV_RecursiveHullCheck (cl.worldmodel->hulls, 0, 0, 1,
|
||||
r_refdef.vieworg, point, &trace))
|
||||
return false;
|
||||
}
|
||||
point[0] = org[0]; point[1] = org[1]-rad; point[2] = org[2]+4;
|
||||
if ( Mod_PointInLeaf(point, cl.worldmodel)->contents != CONTENTS_SOLID)
|
||||
{
|
||||
if (SV_RecursiveHullCheck (cl.worldmodel->hulls, 0, 0, 1,
|
||||
r_refdef.vieworg, point, &trace))
|
||||
return false;
|
||||
}
|
||||
point[0] = org[0]-rad; point[1] = org[1]; point[2] = org[2]+4;
|
||||
if ( Mod_PointInLeaf(point, cl.worldmodel)->contents != CONTENTS_SOLID)
|
||||
{
|
||||
if (SV_RecursiveHullCheck (cl.worldmodel->hulls, 0, 0, 1,
|
||||
r_refdef.vieworg, point, &trace))
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check the poles of the sphere (can catch ents on ledges that would
|
||||
// otherwise be missed)
|
||||
point[0] = org[0]; point[1] = org[1]; point[2] = org[2]+rad;
|
||||
if ( Mod_PointInLeaf(point, cl.worldmodel)->contents != CONTENTS_SOLID)
|
||||
{
|
||||
if (SV_RecursiveHullCheck (cl.worldmodel->hulls, 0, 0, 1,
|
||||
r_refdef.vieworg, point, &trace))
|
||||
return false;
|
||||
}
|
||||
point[0] = org[0]; point[1] = org[1]; point[2] = org[2]-rad;
|
||||
if ( Mod_PointInLeaf(point, cl.worldmodel)->contents != CONTENTS_SOLID)
|
||||
{
|
||||
if (SV_RecursiveHullCheck (cl.worldmodel->hulls, 0, 0, 1,
|
||||
r_refdef.vieworg, point, &trace))
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check the corners...
|
||||
if ( Mod_PointInLeaf(maxs, cl.worldmodel)->contents != CONTENTS_SOLID)
|
||||
{
|
||||
if (SV_RecursiveHullCheck (cl.worldmodel->hulls, 0, 0, 1,
|
||||
r_refdef.vieworg, maxs, &trace))
|
||||
return false;
|
||||
}
|
||||
point[0] = mins[0]; point[1] = maxs[1]; point[2] = maxs[2];
|
||||
if ( Mod_PointInLeaf(point, cl.worldmodel)->contents != CONTENTS_SOLID)
|
||||
{
|
||||
if (SV_RecursiveHullCheck (cl.worldmodel->hulls, 0, 0, 1,
|
||||
r_refdef.vieworg, point, &trace))
|
||||
return false;
|
||||
}
|
||||
point[0] = mins[0]; point[1] = mins[1]; point[2] = maxs[2];
|
||||
if ( Mod_PointInLeaf(point, cl.worldmodel)->contents != CONTENTS_SOLID)
|
||||
{
|
||||
if (SV_RecursiveHullCheck (cl.worldmodel->hulls, 0, 0, 1,
|
||||
r_refdef.vieworg, point, &trace))
|
||||
return false;
|
||||
}
|
||||
point[0] = maxs[0]; point[1] = mins[1]; point[2] = maxs[2];
|
||||
if ( Mod_PointInLeaf(point, cl.worldmodel)->contents != CONTENTS_SOLID)
|
||||
{
|
||||
if (SV_RecursiveHullCheck (cl.worldmodel->hulls, 0, 0, 1,
|
||||
r_refdef.vieworg, point, &trace))
|
||||
return false;
|
||||
}
|
||||
if ( Mod_PointInLeaf(mins, cl.worldmodel)->contents != CONTENTS_SOLID)
|
||||
{
|
||||
if (SV_RecursiveHullCheck (cl.worldmodel->hulls, 0, 0, 1,
|
||||
r_refdef.vieworg, mins, &trace))
|
||||
return false;
|
||||
}
|
||||
point[0] = mins[0]; point[1] = maxs[1]; point[2] = mins[2]+4;
|
||||
if ( Mod_PointInLeaf(point, cl.worldmodel)->contents != CONTENTS_SOLID)
|
||||
{
|
||||
if (SV_RecursiveHullCheck (cl.worldmodel->hulls, 0, 0, 1,
|
||||
r_refdef.vieworg, point, &trace))
|
||||
return false;
|
||||
}
|
||||
point[0] = maxs[0]; point[1] = mins[1]; point[2] = mins[2]+4;
|
||||
if ( Mod_PointInLeaf(point, cl.worldmodel)->contents != CONTENTS_SOLID)
|
||||
{
|
||||
if (SV_RecursiveHullCheck (cl.worldmodel->hulls, 0, 0, 1,
|
||||
r_refdef.vieworg, point, &trace))
|
||||
return false;
|
||||
}
|
||||
point[0] = maxs[0]; point[1] = maxs[1]; point[2] = mins[2]+4;
|
||||
if ( Mod_PointInLeaf(point, cl.worldmodel)->contents != CONTENTS_SOLID)
|
||||
{
|
||||
if (SV_RecursiveHullCheck (cl.worldmodel->hulls, 0, 0, 1,
|
||||
r_refdef.vieworg, point, &trace))
|
||||
return false;
|
||||
}
|
||||
|
||||
// Model is blocked (probably)
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue