mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-16 16:20:53 +00:00
CLEANUP: Don't assign invalid extents when loading bounding boxes
This commit is contained in:
parent
b3cee84787
commit
5bca2919c2
@ -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…
x
Reference in New Issue
Block a user