Commit R_CullSphere use for alias models. Only a 3.3% speed hit for me, and should quiet "foo is disappearing" whinging.

This commit is contained in:
Ragnvald Maartmann-Moe IV 2002-08-23 04:09:00 +00:00
parent ef7a72890e
commit aa85219dc4

View file

@ -509,26 +509,21 @@ R_AliasGetSkindesc (int skinnum, aliashdr_t *ahdr)
void void
R_DrawAliasModel (entity_t *e) R_DrawAliasModel (entity_t *e)
{ {
float add, an, minshade, shade; float add, an, minshade, radius, shade;
int lnum, i, texture; int lnum, texture, i;
int fb_texture = 0; int fb_texture = 0;
aliashdr_t *paliashdr; aliashdr_t *paliashdr;
model_t *model; model_t *model;
vec3_t dist, mins, maxs, scale; vec3_t dist, scale;
vert_order_t *vo; vert_order_t *vo;
model = e->model; model = e->model;
VectorAdd (e->origin, model->mins, mins); radius = model->radius;
VectorAdd (e->origin, model->maxs, maxs); if (e->scale != 1.0)
radius *= e->scale;
if (e->scale != 1.0) { if (R_CullSphere (e->origin, radius))
VectorScale (mins, e->scale, mins);
VectorScale (maxs, e->scale, maxs);
// radius = radius * scale;
}
if (R_CullBox (mins, maxs))
return; return;
VectorSubtract (r_origin, e->origin, modelorg); VectorSubtract (r_origin, e->origin, modelorg);