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

This reverts commit b201fd6dd6.
This commit is contained in:
rtw1x1
2025-12-31 09:58:06 +00:00
parent fb4ba5960e
commit 999a0929a6
3 changed files with 3 additions and 27 deletions

View File

@@ -14,33 +14,16 @@ const CGrannyModel::TMeshNode* CGrannyModel::GetMeshNodeList(CGrannyMesh::EType
CGrannyMesh * CGrannyModel::GetMeshPointer(int iMesh)
{
if (!CheckMeshIndex(iMesh))
assert(CheckMeshIndex(iMesh));
assert(m_meshs != NULL);
{
TraceError("CGrannyModel::GetMeshPointer - Invalid mesh index: %d (max: %d)", iMesh, m_meshNodeSize);
return nullptr;
}
if (m_meshs == NULL)
{
TraceError("CGrannyModel::GetMeshPointer - m_meshs is NULL");
return nullptr;
}
return m_meshs + iMesh;
}
const CGrannyMesh* CGrannyModel::GetMeshPointer(int iMesh) const
{
if (!CheckMeshIndex(iMesh))
{
TraceError("CGrannyModel::GetMeshPointer(const) - Invalid mesh index: %d (max: %d)", iMesh, m_meshNodeSize);
return nullptr;
}
if (m_meshs == NULL)
{
TraceError("CGrannyModel::GetMeshPointer(const) - m_meshs is NULL");
return nullptr;
}
assert(CheckMeshIndex(iMesh));
assert(m_meshs != NULL);
return m_meshs + iMesh;
}