diff --git a/CodeWalker.Core/GameFiles/FileTypes/YmapFile.cs b/CodeWalker.Core/GameFiles/FileTypes/YmapFile.cs index 677c4be..a7fa2f2 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/YmapFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/YmapFile.cs @@ -2109,12 +2109,12 @@ namespace CodeWalker.GameFiles } if (lightAttrs == null) return; - var abmin = db.BoundingBoxMin; - var abmax = db.BoundingBoxMax; + var abmin = Vector3.Min(Archetype.BBMin, db.BoundingBoxMin); + var abmax = Vector3.Max(Archetype.BBMax, db.BoundingBoxMax); if (b != null) { - abmin = b.BoxMin; - abmax = b.BoxMax; + abmin = Vector3.Min(abmin, b.BoxMin); + abmax = Vector3.Max(abmax, b.BoxMax); } var bb = new BoundingBox(abmin, abmax).Transform(Position, Orientation, Scale); var ints = new uint[7];