mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-17 22:50:51 +00:00
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:
parent
ef7a72890e
commit
aa85219dc4
1 changed files with 7 additions and 12 deletions
|
@ -509,26 +509,21 @@ R_AliasGetSkindesc (int skinnum, aliashdr_t *ahdr)
|
|||
void
|
||||
R_DrawAliasModel (entity_t *e)
|
||||
{
|
||||
float add, an, minshade, shade;
|
||||
int lnum, i, texture;
|
||||
float add, an, minshade, radius, shade;
|
||||
int lnum, texture, i;
|
||||
int fb_texture = 0;
|
||||
aliashdr_t *paliashdr;
|
||||
model_t *model;
|
||||
vec3_t dist, mins, maxs, scale;
|
||||
vec3_t dist, scale;
|
||||
vert_order_t *vo;
|
||||
|
||||
model = e->model;
|
||||
|
||||
VectorAdd (e->origin, model->mins, mins);
|
||||
VectorAdd (e->origin, model->maxs, maxs);
|
||||
radius = model->radius;
|
||||
if (e->scale != 1.0)
|
||||
radius *= e->scale;
|
||||
|
||||
if (e->scale != 1.0) {
|
||||
VectorScale (mins, e->scale, mins);
|
||||
VectorScale (maxs, e->scale, maxs);
|
||||
// radius = radius * scale;
|
||||
}
|
||||
|
||||
if (R_CullBox (mins, maxs))
|
||||
if (R_CullSphere (e->origin, radius))
|
||||
return;
|
||||
|
||||
VectorSubtract (r_origin, e->origin, modelorg);
|
||||
|
|
Loading…
Reference in a new issue