From 0f62bdd99ebe0e915dd2e95cfa9d7942b3f84138 Mon Sep 17 00:00:00 2001 From: drfrag Date: Thu, 31 Dec 2020 21:02:28 +0100 Subject: [PATCH] - Check for the renderer too before ticking dynlights. --- src/dthinker.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/dthinker.cpp b/src/dthinker.cpp index 33c081ba7..9cbddbc66 100644 --- a/src/dthinker.cpp +++ b/src/dthinker.cpp @@ -53,6 +53,7 @@ extern cycle_t BotSupportCycles; extern cycle_t ActionCycles; extern int BotWTG; +EXTERN_CVAR (Int, vid_renderer) EXTERN_CVAR (Bool, gl_lights) EXTERN_CVAR (Bool, r_dynlights) @@ -627,7 +628,7 @@ void DThinker::RunThinkers () } } while (count != 0); - if (level.lights && (gl_lights || r_dynlights)) + if (level.lights && (vid_renderer && gl_lights || !vid_renderer && r_dynlights)) { for (auto light = level.lights; light;) { @@ -656,7 +657,7 @@ void DThinker::RunThinkers () } } while (count != 0); - if (level.lights && (gl_lights || r_dynlights)) + if (level.lights && (vid_renderer && gl_lights || !vid_renderer && r_dynlights)) { // Also profile the internal dynamic lights, even though they are not implemented as thinkers. auto &prof = Profiles[NAME_InternalDynamicLight];