- changed light mode handling of the hardware renderer so that it only operates on local copies but doesn't alter the level's setting.
There are several places where a temporary change of light mode is needed, all these made this change in the global level struct. Now the change is only local to the active draw info.
This commit is contained in:
parent
3328821a98
commit
dca4a42dd6
19 changed files with 130 additions and 122 deletions
|
|
@ -128,7 +128,7 @@ CUSTOM_CVAR(Int, gl_lightmode, 3, CVAR_ARCHIVE | CVAR_NOINITCALL)
|
|||
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 == ELightMode::NotSet)) level.lightmode = (ELightMode)*self;
|
||||
else if ((level.info == nullptr || level.info->lightmode == ELightMode::NotSet)) level.lightMode = (ELightMode)*self;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1530,7 +1530,7 @@ void G_InitLevelLocals ()
|
|||
|
||||
level.DefaultEnvironment = info->DefaultEnvironment;
|
||||
|
||||
level.lightmode = info->lightmode == ELightMode::NotSet? (ELightMode)*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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue