Light hash calculation bounding box fix

This commit is contained in:
dexy 2021-05-03 23:53:34 +10:00
parent 5ebda6f0bb
commit 37ac0ba62b

View File

@ -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];