diff --git a/src/g_level.cpp b/src/g_level.cpp index d161059e6..c21031706 100644 --- a/src/g_level.cpp +++ b/src/g_level.cpp @@ -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) diff --git a/src/gameconfigfile.cpp b/src/gameconfigfile.cpp index 5a801bff3..0b3931e88 100644 --- a/src/gameconfigfile.cpp +++ b/src/gameconfigfile.cpp @@ -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); } }