- rewrote dynamic lights to not use actors for the internal representation and made DynamicLight a purely scripted class.

This should be less of a drag on the playsim than having each light a separate actor. A quick check with ZDCMP2 showed that the light processing time was reduced to 1/3rd from 0.5 ms to 0.17 ms per tic.
It's also one native actor class less.
This commit is contained in:
Christoph Oelckers 2019-01-01 19:35:55 +01:00
commit d654e02dea
34 changed files with 438 additions and 412 deletions

View file

@ -749,8 +749,7 @@ void D_Display ()
// Check for the presence of dynamic lights at the start of the frame once.
if ((gl_lights && vid_rendermode == 4) || (r_dynlights && vid_rendermode != 4))
{
TThinkerIterator<ADynamicLight> it(STAT_DLIGHT);
level.HasDynamicLights = !!it.Next();
level.HasDynamicLights = !!level.lights;
}
else level.HasDynamicLights = false; // lights are off so effectively we have none.