Don't try and compute visibility for lights outside of the world

This commit is contained in:
Jarrod Doyle 2025-01-28 17:49:52 +00:00
parent db0b1f9c7a
commit fafae43c56
Signed by: Jayrude
GPG Key ID: 38B57B16E7C0ADF7
1 changed files with 1 additions and 1 deletions

View File

@ -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<int[]>(_lights.Count);