mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
[gl,glsl,sw] Skip onlyshadows alias models
While the gl renderer does (or did) have it's attempt at shadows, the others don't even try, thus the onlyshadows-marked player model doesn't work so well (looks rather goofy seeing the arms like that).
This commit is contained in:
parent
ff271c7724
commit
efea07f488
3 changed files with 10 additions and 0 deletions
|
@ -415,6 +415,10 @@ gl_R_DrawAliasModel (entity_t e)
|
|||
renderer_t *renderer = Ent_GetComponent (e.id, scene_renderer, e.reg);
|
||||
model_t *model = renderer->model;
|
||||
|
||||
if (renderer->onlyshadows) {
|
||||
return;
|
||||
}
|
||||
|
||||
radius = model->radius;
|
||||
transform_t transform = Entity_Transform (e);
|
||||
origin = Transform_GetWorldPosition (transform);
|
||||
|
|
|
@ -242,6 +242,9 @@ glsl_R_DrawAlias (entity_t ent)
|
|||
calc_lighting (ent, &ambient, &shadelight, lightvec);
|
||||
|
||||
renderer_t *renderer = Ent_GetComponent (ent.id, scene_renderer, ent.reg);
|
||||
if (renderer->onlyshadows) {
|
||||
return;
|
||||
}
|
||||
model_t *model = renderer->model;
|
||||
if (!(hdr = model->aliashdr))
|
||||
hdr = Cache_Get (&model->cache);
|
||||
|
|
|
@ -617,6 +617,9 @@ R_AliasDrawModel (entity_t ent, alight_t *lighting)
|
|||
r_amodels_drawn++;
|
||||
|
||||
renderer_t *renderer = Ent_GetComponent (ent.id, scene_renderer, ent.reg);
|
||||
if (renderer->onlyshadows) {
|
||||
return;
|
||||
}
|
||||
if (!(paliashdr = renderer->model->aliashdr))
|
||||
paliashdr = Cache_Get (&renderer->model->cache);
|
||||
pmdl = (mdl_t *) ((byte *) paliashdr + paliashdr->model);
|
||||
|
|
Loading…
Reference in a new issue