[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:
Bill Currie 2023-08-14 14:53:43 +09:00
parent ff271c7724
commit efea07f488
3 changed files with 10 additions and 0 deletions

View file

@ -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);

View file

@ -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);

View file

@ -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);