Merge branch 'master' into Texture_Cleanup

This commit is contained in:
Christoph Oelckers 2018-12-15 09:45:26 +01:00
commit 3d0fb6cf90
13 changed files with 143 additions and 50 deletions

View file

@ -123,10 +123,11 @@ CUSTOM_CVAR(Bool, gl_notexturefill, false, CVAR_NOINITCALL)
CUSTOM_CVAR(Int, gl_lightmode, 3, CVAR_ARCHIVE | CVAR_NOINITCALL)
{
int newself = self;
if (newself > 4) newself = 8; // use 8 for software lighting to avoid conflicts with the bit mask
if (newself < 0) newself = 0;
if (newself > 8) newself = 16; // use 8 and 16 for software lighting to avoid conflicts with the bit mask
else if (newself > 4) newself = 8;
else if (newself < 0) newself = 0;
if (self != newself) self = newself;
else if ((level.info == nullptr || level.info->lightmode == -1)) level.lightmode = self;
else if ((level.info == nullptr || level.info->lightmode == ELightMode::NotSet)) level.lightmode = (ELightMode)*self;
}
@ -1522,7 +1523,7 @@ void G_InitLevelLocals ()
level.DefaultEnvironment = info->DefaultEnvironment;
level.lightmode = info->lightmode < 0? gl_lightmode : info->lightmode;
level.lightmode = info->lightmode == ELightMode::NotSet? (ELightMode)*gl_lightmode : info->lightmode;
level.brightfog = info->brightfog < 0? gl_brightfog : !!info->brightfog;
level.lightadditivesurfaces = info->lightadditivesurfaces < 0 ? gl_lightadditivesurfaces : !!info->lightadditivesurfaces;
level.notexturefill = info->notexturefill < 0 ? gl_notexturefill : !!info->notexturefill;