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
|
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);
|
||||||
|
|
Loading…
Reference in a new issue