Fix light probes not working for maps having no dynamic lights at all

This commit is contained in:
Magnus Norddahl 2021-11-13 05:09:25 +01:00
parent 5dec391c8c
commit d197d19122
1 changed files with 2 additions and 2 deletions

View File

@ -383,9 +383,9 @@ void D_Render(std::function<void()> action, bool interpolate)
for (auto Level : AllLevels())
{
// Check for the presence of dynamic lights at the start of the frame once.
if ((gl_lights && vid_rendermode == 4) || (r_dynlights && vid_rendermode != 4))
if ((gl_lights && vid_rendermode == 4) || (r_dynlights && vid_rendermode != 4) || Level->LightProbes.Size() > 0)
{
Level->HasDynamicLights = !!Level->lights;
Level->HasDynamicLights = Level->lights || Level->LightProbes.Size() > 0;
}
else Level->HasDynamicLights = false; // lights are off so effectively we have none.
if (interpolate) Level->interpolator.DoInterpolations(I_GetTimeFrac());