mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-28 21:39:48 +00:00
CLEANUP: Don't assign invalid extents when loading bounding boxes
This commit is contained in:
parent
b3cee84787
commit
5bca2919c2
1 changed files with 2 additions and 1 deletions
|
@ -85,7 +85,8 @@ namespace NifBullet
|
|||
{
|
||||
if (Misc::StringUtils::ciEqual(node.mName, "Bounding Box"))
|
||||
{
|
||||
if (node.mBounds.mType == Nif::BoundingVolume::Type::BOX_BV)
|
||||
if (node.mBounds.mType == Nif::BoundingVolume::Type::BOX_BV
|
||||
&& std::ranges::all_of(node.mBounds.mBox.mExtents._v, [](float extent) { return extent > 0.f; }))
|
||||
{
|
||||
mShape->mCollisionBox.mExtents = node.mBounds.mBox.mExtents;
|
||||
mShape->mCollisionBox.mCenter = node.mBounds.mBox.mCenter;
|
||||
|
|
Loading…
Reference in a new issue