- made r_fullbrightignoresectorcolor a MAPINFO option, so far only working on the software renderer. GL still needs a few changes to handle it correctly.

This commit is contained in:
Christoph Oelckers 2017-01-28 12:20:18 +01:00
commit dd03bb1fcb
12 changed files with 53 additions and 25 deletions

View file

@ -59,6 +59,7 @@
#include "r_data/colormaps.h"
#include "p_maputl.h"
#include "r_thread.h"
#include "g_levellocals.h"
CVAR (String, r_viewsize, "", CVAR_NOSET)
CVAR (Bool, r_shadercolormaps, true, CVAR_ARCHIVE)
@ -78,8 +79,6 @@ CUSTOM_CVAR (Int, r_columnmethod, 1, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
CVAR(Int, r_portal_recursions, 4, CVAR_ARCHIVE)
CVAR(Bool, r_highlight_portals, false, CVAR_ARCHIVE)
EXTERN_CVAR(Bool, r_fullbrightignoresectorcolor)
extern cycle_t WallCycles, PlaneCycles, MaskedCycles, WallScanCycles;
extern cycle_t FrameCycles;
@ -488,7 +487,7 @@ void R_SetupColormap(player_t *player)
{
fixedlightlev = player->fixedlightlevel * 256;
// [SP] Emulate GZDoom's light-amp goggles.
if (r_fullbrightignoresectorcolor && fixedlightlev >= 0)
if (!level.PreserveSectorColor() && fixedlightlev >= 0)
{
fixedcolormap = FullNormalLight.Maps;
}