diff --git a/KeepersCompound.Lightmapper/PotentiallyVisibleSet.cs b/KeepersCompound.Lightmapper/PotentiallyVisibleSet.cs index 566618f..99cc401 100644 --- a/KeepersCompound.Lightmapper/PotentiallyVisibleSet.cs +++ b/KeepersCompound.Lightmapper/PotentiallyVisibleSet.cs @@ -1,6 +1,7 @@ using System.Collections; using System.Numerics; using KeepersCompound.LGS.Database.Chunks; +using Serilog; namespace KeepersCompound.Lightmapper; @@ -98,7 +99,6 @@ public class PotentiallyVisibleSet public PotentiallyVisibleSet(WorldRep.Cell[] cells) { _graph = new Node[cells.Length]; - _edges = []; var portalCount = 0; foreach (var cell in cells) @@ -106,6 +106,9 @@ public class PotentiallyVisibleSet portalCount += cell.PortalPolyCount; } + _edges = new List(portalCount); + Log.Information("Mission contains {PortalCount} portals.", portalCount); + for (var i = 0; i < cells.Length; i++) { var cell = cells[i];