Update guiMissionArea.cpp

simplify logic around skipping objects that push the mLevelBounds outside F32_MAX
This commit is contained in:
marauder2k7 2025-06-15 17:15:59 +01:00
parent 4fc182444e
commit 47bff2f0eb

View file

@ -350,16 +350,11 @@ void GuiMissionAreaCtrl::updateLevelBitmap()
if (!obj) if (!obj)
continue; continue;
// Skip if bounds are too large (e.g., GroundPlane or visual-only objects) if (obj->isGlobalBounds())
const Box3F& box = obj->getWorldBox();
const F32 maxSizeThreshold = 2048.0f; // or tweak for your game scale
VectorF extents = box.getExtents();
if (extents.x > maxSizeThreshold || extents.y > maxSizeThreshold)
continue; continue;
// Merge bounds // Merge bounds
mLevelBounds.intersect(box); mLevelBounds.intersect(obj->getWorldBox());
} }
const F32 minSize = 256.0f; const F32 minSize = 256.0f;