- Check for the renderer too before ticking dynlights.

This commit is contained in:
drfrag 2020-12-31 21:02:28 +01:00
parent 65c6f3ea43
commit 0f62bdd99e

View file

@ -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];