- fixed bad range check in shadowmap code.

Since the last refactoring this only counts lights, not occupied entries in the array, but the check wasn't adjusted for that.
This commit is contained in:
Christoph Oelckers 2020-06-12 15:07:13 +02:00
parent 8e46f235a6
commit 80b5a66635
2 changed files with 2 additions and 1 deletions

View file

@ -366,6 +366,7 @@ void FLevelLocals::ClearLevelData()
localEventManager->Shutdown(); localEventManager->Shutdown();
if (aabbTree) delete aabbTree; if (aabbTree) delete aabbTree;
aabbTree = nullptr; aabbTree = nullptr;
screen->SetAABBTree(nullptr);
} }

View file

@ -73,7 +73,7 @@ void CollectLights(FLevelLocals* Level)
for (auto light = Level->lights; light; light = light->next) for (auto light = Level->lights; light; light = light->next)
{ {
IShadowMap::LightsProcessed++; IShadowMap::LightsProcessed++;
if (light->shadowmapped && light->IsActive() && lightindex < 1024 * 4) if (light->shadowmapped && light->IsActive() && lightindex < 1024)
{ {
IShadowMap::LightsShadowmapped++; IShadowMap::LightsShadowmapped++;