This commit is contained in:
Gene 2025-04-07 04:21:35 -07:00
commit 9e32e58c8f
11 changed files with 101 additions and 75 deletions

View file

@ -209,12 +209,14 @@ namespace swrenderer
float lit_green = 0;
float lit_blue = 0;
auto Level = vis->sector->Level;
auto flatLightList = Level->lightlists.flat_dlist.find(vis->section);
if (flatLightList != Level->lightlists.flat_dlist.end())
auto flatLightList = Level->lightlists.flat_dlist.CheckKey(vis->section);
if (flatLightList)
{
for (auto nodeIterator = flatLightList->second.begin(); nodeIterator != flatLightList->second.end(); nodeIterator++)
TMap<FDynamicLight *, FLightNode *>::Iterator it(*flatLightList);
TMap<FDynamicLight *, FLightNode *>::Pair *pair;
while (it.NextPair(pair))
{
auto node = nodeIterator->second;
auto node = pair->Value;
if (!node) continue;
FDynamicLight *light = node->lightsource;