mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-27 06:34:11 +00:00
Use R_CullSphere for rotated bsp models.
This commit is contained in:
parent
d757c10f07
commit
7bf21e20ed
1 changed files with 15 additions and 15 deletions
|
@ -269,7 +269,7 @@ DrawTextureChains (void)
|
|||
void
|
||||
R_DrawBrushModel (entity_t *e)
|
||||
{
|
||||
float dot;
|
||||
float dot, radius;
|
||||
float color[4];
|
||||
int i, k;
|
||||
model_t *model;
|
||||
|
@ -282,26 +282,26 @@ R_DrawBrushModel (entity_t *e)
|
|||
|
||||
if (e->angles[0] || e->angles[1] || e->angles[2]) {
|
||||
rotated = true;
|
||||
for (i = 0; i < 3; i++) {
|
||||
mins[i] = e->origin[i] - model->radius;
|
||||
maxs[i] = e->origin[i] + model->radius;
|
||||
}
|
||||
radius = model->radius;
|
||||
#if 0 //QSG FIXME
|
||||
if (e->scale != 1.0)
|
||||
radius *= e->scale;
|
||||
#endif
|
||||
if (R_CullSphere (e->origin, radius))
|
||||
return;
|
||||
} else {
|
||||
rotated = false;
|
||||
VectorAdd (e->origin, model->mins, mins);
|
||||
VectorAdd (e->origin, model->maxs, maxs);
|
||||
}
|
||||
|
||||
#if 0 // QSG FIXME
|
||||
if (e->scale != 1.0) {
|
||||
VectorScale (mins, e->scale, mins);
|
||||
VectorScale (maxs, e->scale, maxs);
|
||||
radius = model->radius * e->scale;
|
||||
}
|
||||
if (e->scale != 1.0) {
|
||||
VectorScale (mins, e->scale, mins);
|
||||
VectorScale (maxs, e->scale, maxs);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (R_CullBox (mins, maxs))
|
||||
return;
|
||||
if (R_CullBox (mins, maxs))
|
||||
return;
|
||||
}
|
||||
|
||||
VectorCopy (e->colormod, color);
|
||||
color[3] = e->colormod[3];
|
||||
|
|
Loading…
Reference in a new issue