make random directionallight toggable
This commit is contained in:
1 parent
f061d66a16
commit
3b2e207b6b
3 files changed
+9
-3
No files matched your search
+3
-3
@@ -329,10 +329,10 @@ static void P_ClearSingleMapHeaderInfo(INT16 i)
|
||||
|
||||
static void P_ClearDirectionalLightMapHeaderInfo(INT16 i) // lol dont always reset this on every map load
|
||||
{
|
||||
mapheaderinfo[i]->light_contrast = M_RandomRange(0, 58);
|
||||
mapheaderinfo[i]->light_contrast = cv_randomdirlight.value ? M_RandomRange(0, 58) : 8;
|
||||
mapheaderinfo[i]->sprite_backlight = 0;
|
||||
mapheaderinfo[i]->use_light_angle = true;
|
||||
mapheaderinfo[i]->light_angle = M_RandomRange(-382, 382);
|
||||
mapheaderinfo[i]->use_light_angle = cv_randomdirlight.value ? true : false;
|
||||
mapheaderinfo[i]->light_angle = cv_randomdirlight.value ? M_RandomRange(-382, 382) : 0;
|
||||
}
|
||||
|
||||
/** Allocates a new map-header structure.
|
||||
|
||||
@@ -205,6 +205,8 @@ consvar_t cv_homremoval = {"homremoval", "Yes", CV_SAVE, homremoval_cons_t, NULL
|
||||
|
||||
consvar_t cv_maxportals = {"maxportals", "2", CV_SAVE, maxportals_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
consvar_t cv_randomdirlight = {"randomdirectionallight", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
void SplitScreen_OnChange(void)
|
||||
{
|
||||
UINT8 i;
|
||||
@@ -1579,6 +1581,8 @@ void R_RegisterEngineStuff(void)
|
||||
|
||||
CV_RegisterVar(&cv_maxportals);
|
||||
|
||||
CV_RegisterVar(&cv_randomdirlight);
|
||||
|
||||
CV_RegisterVar(&cv_maxinterpdist);
|
||||
|
||||
CV_RegisterVar(&cv_ripplewater);
|
||||
|
||||
@@ -158,6 +158,8 @@ extern consvar_t cv_tailspickup;
|
||||
extern consvar_t cv_maxinterpdist;
|
||||
extern consvar_t cv_ripplewater;
|
||||
|
||||
extern consvar_t cv_randomdirlight;
|
||||
|
||||
// Called by startup code.
|
||||
void R_Init(void);
|
||||
|
||||
|
||||
Reference in new issue
Block a user