mathutil: Fix scaling BoundingSphere to infinite causing assertions

This error occurs when a BoundingSphere with a large radius is scaled by an even larger radius such that the radius becomes infinite.  In this case, the BoundingSphere should be properly marked as infinite so that it behaves properly (and doesn't cause other assertions down the line).
This commit is contained in:
rdb 2021-01-18 19:03:00 +01:00
parent 68daa238b1
commit 29cdd78c4e

View File

@ -112,6 +112,10 @@ xform(const LMatrix4 &mat) {
// Transform the center
_center = _center * mat;
if (cinf(_radius)) {
set_infinite();
}
}
}