mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-12-13 05:41:10 +00:00
- Fixed: dynamic lights ticked even when disabled.
This commit is contained in:
parent
846de93f3a
commit
53db54713c
1 changed files with 11 additions and 5 deletions
|
@ -53,6 +53,9 @@ extern cycle_t BotSupportCycles;
|
|||
extern cycle_t ActionCycles;
|
||||
extern int BotWTG;
|
||||
|
||||
EXTERN_CVAR (Bool, gl_lights)
|
||||
EXTERN_CVAR (Bool, r_dynlights)
|
||||
|
||||
IMPLEMENT_CLASS(DThinker, false, false)
|
||||
|
||||
DThinker *NextToThink;
|
||||
|
@ -624,11 +627,14 @@ void DThinker::RunThinkers ()
|
|||
}
|
||||
} while (count != 0);
|
||||
|
||||
for (auto light = level.lights; light;)
|
||||
if (level.lights && (gl_lights || r_dynlights))
|
||||
{
|
||||
auto next = light->next;
|
||||
light->Tick();
|
||||
light = next;
|
||||
for (auto light = level.lights; light;)
|
||||
{
|
||||
auto next = light->next;
|
||||
light->Tick();
|
||||
light = next;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -650,7 +656,7 @@ void DThinker::RunThinkers ()
|
|||
}
|
||||
} while (count != 0);
|
||||
|
||||
if (level.lights)
|
||||
if (level.lights && (gl_lights || r_dynlights))
|
||||
{
|
||||
// Also profile the internal dynamic lights, even though they are not implemented as thinkers.
|
||||
auto &prof = Profiles[NAME_InternalDynamicLight];
|
||||
|
|
Loading…
Reference in a new issue