- changed dynamic light traversal to use sections instead of the subsectors.

This is mostly complete, except for handling intra-section sidedefs.
This commit is contained in:
Christoph Oelckers 2018-11-06 00:13:23 +01:00
commit ba66c0c889
20 changed files with 117 additions and 123 deletions

View file

@ -202,6 +202,7 @@ namespace swrenderer
// killough 3/27/98: save sector for special clipping later
vis->heightsec = heightsec;
vis->sector = thing->Sector;
vis->section = thing->section;
vis->depth = (float)tz;
vis->gpos = { (float)pos.X, (float)pos.Y, (float)pos.Z };
@ -251,7 +252,7 @@ namespace swrenderer
float lit_red = 0;
float lit_green = 0;
float lit_blue = 0;
auto node = vis->sector->lighthead;
auto node = vis->section->lighthead;
while (node != nullptr)
{
ADynamicLight *light = node->lightsource;