From fafae43c5664a24ab56fd740143bc11ef7829160 Mon Sep 17 00:00:00 2001 From: Jarrod Doyle Date: Tue, 28 Jan 2025 17:49:52 +0000 Subject: [PATCH] Don't try and compute visibility for lights outside of the world --- KeepersCompound.Lightmapper/LightMapper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/KeepersCompound.Lightmapper/LightMapper.cs b/KeepersCompound.Lightmapper/LightMapper.cs index 85cff24..795b591 100644 --- a/KeepersCompound.Lightmapper/LightMapper.cs +++ b/KeepersCompound.Lightmapper/LightMapper.cs @@ -485,7 +485,7 @@ public class LightMapper var pvs = new PotentiallyVisibleSet(worldRep.Cells); Parallel.ForEach(lightCellMap, i => { - pvs.ComputeVisibility(i); + if (i != -1) pvs.ComputeVisibility(i); }); var visibleCellMap = new List(_lights.Count);