Maps with a ZDRayInfo must always have dynamic lights (gl_lights cvar is ignored in this situation)

This commit is contained in:
Magnus Norddahl 2024-12-06 20:58:12 +01:00
commit db4472b067
2 changed files with 7 additions and 4 deletions

View file

@ -77,8 +77,11 @@ CUSTOM_CVAR (Bool, gl_lights, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOIN
{
for (auto Level : AllLevels())
{
if (self) Level->RecreateAllAttachedLights();
else Level->DeleteAllAttachedLights();
if (!Level->lightmaps)
{
if (self) Level->RecreateAllAttachedLights();
else Level->DeleteAllAttachedLights();
}
}
}

View file

@ -109,9 +109,9 @@ void FThinkerCollection::RunThinkers(FLevelLocals *Level)
ThinkCycles.Clock();
bool dolights;
if ((gl_lights && vid_rendermode == 4) || (r_dynlights && vid_rendermode != 4))
if ((gl_lights && vid_rendermode == 4) || (r_dynlights && vid_rendermode != 4) || Level->lightmaps)
{
dolights = true;// Level->lights || (Level->flags3 & LEVEL3_LIGHTCREATED);
dolights = true;// Level->lights || (Level->flags3 & LEVEL3_LIGHTCREATED) || Level->lightmaps;
}
else
{