HalfLifeAssetManager
HalfLifeAssetManager copied to clipboard
Xash3D models crash the program
When loading a model compiled with Xash3D's studiomdl compiler the program crashes. This is because Xash models include additional data such as bone weights that changes the structure of the file format. Xash models still report themselves as IDST version 10 models, so the usual checks don't catch this.
Xash models seem to append the string (written by Xash3D studiomdl)
to the studiohdr_t::name
field so this could be used to trivially reject these models. Additional error handling is also required to catch models that have invalid offsets, corrupted data, or data misinterpreted as offsets due to using the wrong format (Xash's case).