mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-02-16 17:21:10 +00:00
- fixed flags for gl_lightmode.
With how this is being handled now, the CVAR needs to have the CVAR_GLOBALCONFIG flag and CVAR_NOINITCALL unset or it simply won't work right. Since its meaning has completely changed now (i.e. it's mainly a performance switch to a less demanding implementation instead of being able to select vastly different lighting methods) making it global is more sensible.
This commit is contained in:
parent
23ffaaecb0
commit
7fbd99ca0f
2 changed files with 3 additions and 3 deletions
|
@ -151,9 +151,9 @@ CUSTOM_CVAR(Int, gl_maplightmode, -1, CVAR_NOINITCALL) // this is just for testi
|
|||
if (self > 5 || self < -1) self = -1;
|
||||
}
|
||||
|
||||
CUSTOM_CVAR(Int, gl_lightmode, 1, CVAR_ARCHIVE | CVAR_NOINITCALL)
|
||||
CUSTOM_CVAR(Int, gl_lightmode, 1, CVAR_ARCHIVE)
|
||||
{
|
||||
if (self < 0 || self > 2) self = 2;
|
||||
if (self < 0 || self > 2) self = 1;
|
||||
}
|
||||
|
||||
ELightMode getRealLightmode(FLevelLocals* Level, bool for3d)
|
||||
|
|
|
@ -612,7 +612,7 @@ void FGameConfigFile::DoGlobalSetup ()
|
|||
if (const auto var = FindCVar("gl_lightmode", NULL))
|
||||
{
|
||||
UCVarValue v = var->GetGenericRep(CVAR_Int);
|
||||
v.Int /= 8; // all legacy modes map to 0, ZDoom software to 1 and Vanilla software to 2.
|
||||
v.Int = v.Int == 16 ? 2 : v.Int == 8 ? 1 : 0;
|
||||
var->SetGenericRep(v, CVAR_Int);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue