Add model brightess

This commit is contained in:
Ryan Baldwin 2022-08-18 23:30:00 -07:00
parent 66884a2876
commit 558419cd04
3 changed files with 20 additions and 1 deletions

View File

@ -678,6 +678,24 @@ void R_DrawAliasModel (entity_t *e)
VectorCopy (currententity->origin, r_entorigin);
VectorSubtract (r_origin, r_entorigin, modelorg);
//Shpuld
if(r_model_brightness.value)
{
lightcolor[0] += 32;
lightcolor[1] += 32;
lightcolor[2] += 32;
}
for(int g = 0; g < 3; g++)
{
if(lightcolor[g] < 8)
lightcolor[g] = 8;
if(lightcolor[g] > 125)
lightcolor[g] = 125;
}
//
// get lighting information
//

View File

@ -228,7 +228,7 @@ void R_Init (void)
Cvar_RegisterVariable (&r_part_flies);
Cvar_RegisterVariable (&r_part_muzzleflash);
Cvar_RegisterVariable (&r_flametype);
//Cvar_RegisterVariable (&r_model_brightness);
Cvar_RegisterVariable (&r_model_brightness);
Cvar_RegisterVariable (&r_flatlightstyles);

View File

@ -264,6 +264,7 @@ extern cvar_t r_decal_bullets;
extern cvar_t r_decal_sparks;
extern cvar_t r_decal_explosions;
extern cvar_t r_coronas;
extern cvar_t r_model_brightness;
extern cvar_t gl_clear;
extern cvar_t gl_cull;