diff --git a/src/p_spec.c b/src/p_spec.c index d4939669a1ec5bce2ee873617b00edfce966829e..0bfde1e7e17cc5aaeb2136d4de05d2c85cacfebe 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -6008,6 +6008,21 @@ static void P_RunLevelLoadExecutors(void) */ void P_InitSpecials(void) { + // rr + mapheader_lighting_t *lighting = &mapheaderinfo[gamemap-1]->lighting; + + if (!cv_maplighting_toggle.value) { + maplighting.contrast = lighting->light_contrast; + maplighting.backlight = lighting->sprite_backlight; + maplighting.directional = lighting->use_light_angle; + maplighting.angle = lighting->light_angle; + } else { + maplighting.contrast = cv_maplighting_contrast.value; + maplighting.backlight = lighting->sprite_backlight; + maplighting.directional = cv_maplighting_directional.value; + maplighting.angle = FixedAngle(FloatToFixed(cv_maplighting_angle.value)); + } + // Set the default gravity. Custom gravity overrides this setting. gravity = mapheaderinfo[gamemap-1]->gravity;