Give a fatal error when no mesh data is loaded

- Part of having mesh data in an IQM includes joints. If a model doesn't have any mesh data to it, it won't have joints, and those are necessary. Poses are a different story however.
This commit is contained in:
Shiny Metagross 2022-08-15 16:53:28 -07:00 committed by Christoph Oelckers
parent 5f0bf8eda6
commit 3c9a1ffe5e

View file

@ -59,6 +59,9 @@ bool IQMModel::Load(const char* path, int lumpnum, const char* buffer, int lengt
uint32_t num_extensions = reader.ReadUInt32();
uint32_t ofs_extensions = reader.ReadUInt32();
if (num_meshes <= 0)
I_FatalError("Invalid model: \"%s%s\", no mesh data is unsupported", path, fileSystem.GetLongName(mLumpNum));
if (num_text == 0)
return false;