move the view model check for min_light into the model loader (checks for

progs/v_*)
This commit is contained in:
Bill Currie 2002-08-19 04:05:02 +00:00
parent 450acbdc91
commit b1a180b25e
2 changed files with 3 additions and 1 deletions

View file

@ -205,6 +205,8 @@ Mod_RealLoadModel (model_t *mod, qboolean crash, cache_allocator_t allocator)
}
if (strequal (mod->name, "progs/player.mdl")) {
mod->min_light = 8;
} else if (strnequal (mod->name, "progs/v_", 8)) {
mod->min_light = 24;
} else {
mod->min_light = 0;
}

View file

@ -558,7 +558,7 @@ R_DrawAliasModel (entity_t *e, qboolean cull)
}
// always give the gun some light
shade = max (shadecolor[0], max (shadecolor[1], shadecolor[2]));
minshade = e == r_view_model ? 24/200.0 : clmodel->min_light / 200.0;
minshade = clmodel->min_light / 200.0;
if (e == r_view_model && shade < minshade) {
shadecolor[0] += minshade - shade;
shadecolor[1] += minshade - shade;