Stop crashing on bad meshes like it's the end of the world

Pushing this on behalf of savis
This commit is contained in:
rtw1x1
2025-12-31 09:05:58 +00:00
parent e7a113885a
commit b201fd6dd6
3 changed files with 27 additions and 3 deletions

View File

@@ -101,6 +101,10 @@ bool CGrannyModelInstance::Intersect(const D3DXMATRIX * c_pMatrix,
granny_matrix_4x4* pgrnMatCompositeBuffer = GrannyGetWorldPoseComposite4x4Array(m_pgrnWorldPose);
const CGrannyMesh* c_pMesh = m_pModel->GetMeshPointer(rcurBoundBox.meshIndex);
if (!c_pMesh)
continue;
const granny_mesh* c_pgrnMesh = c_pMesh->GetGrannyMeshPointer();
if (!GrannyMeshIsRigid(c_pgrnMesh))