- correct checks for HasDynamicLights

This commit is contained in:
Christoph Oelckers 2018-06-26 08:51:21 +02:00
parent e402babfc0
commit 0ed1077f29
2 changed files with 2 additions and 1 deletions

View file

@ -786,7 +786,7 @@ void D_Display ()
// //
// Check for the presence of dynamic lights at the start of the frame once. // Check for the presence of dynamic lights at the start of the frame once.
if (gl_lights) if ((gl_lights && vid_rendermode == 4) || (r_dynlights && vid_rendermode != 4))
{ {
TThinkerIterator<ADynamicLight> it(STAT_DLIGHT); TThinkerIterator<ADynamicLight> it(STAT_DLIGHT);
level.HasDynamicLights = !!it.Next(); level.HasDynamicLights = !!it.Next();

View file

@ -3,6 +3,7 @@
#include "actor.h" #include "actor.h"
#include "cycler.h" #include "cycler.h"
EXTERN_CVAR(Bool, r_dynlights)
EXTERN_CVAR(Bool, gl_lights) EXTERN_CVAR(Bool, gl_lights)
EXTERN_CVAR(Bool, gl_attachedlights) EXTERN_CVAR(Bool, gl_attachedlights)