diff --git a/src/d_main.cpp b/src/d_main.cpp index 4172909bc1..ea727b6fb2 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -786,7 +786,7 @@ void D_Display () // // 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 it(STAT_DLIGHT); level.HasDynamicLights = !!it.Next(); diff --git a/src/g_shared/a_dynlight.h b/src/g_shared/a_dynlight.h index ae2493ca2a..fa9d5840ec 100644 --- a/src/g_shared/a_dynlight.h +++ b/src/g_shared/a_dynlight.h @@ -3,6 +3,7 @@ #include "actor.h" #include "cycler.h" +EXTERN_CVAR(Bool, r_dynlights) EXTERN_CVAR(Bool, gl_lights) EXTERN_CVAR(Bool, gl_attachedlights)