in StudioModelRenderer.h there is an issue at line 143 that don't cause any crash or error.
it will crash when you (or any modders) are trying to access them
// Pointers to current body part and submodel
mstudiobodyparts_t *m_pBodyPart;
mstudiomodel_t *m_pSubModel;
should be
// Pointers to current body part and submodel
mstudiobodyparts_t **m_pBodyPart;
mstudiomodel_t **m_pSubModel;
you have the a pointer to pbodypart in m_pBodyPart instead of the actual value of pbodypart, which means you get a pointer to the pointer to the actual mstudiobodyparts_t struct.
and you should get access to the mstudiobodyparts_t struct by using (*m_pBodyPart)->
in StudioModelRenderer.h there is an issue at line 143 that don't cause any crash or error. it will crash when you (or any modders) are trying to access them
should be
Since in engine we have:
after calling
*ppbodypart = &pbodypart;
you have the a pointer to pbodypart in m_pBodyPart instead of the actual value of pbodypart, which means you get a pointer to the pointer to the actual mstudiobodyparts_t struct.
and you should get access to the mstudiobodyparts_t struct by using
(*m_pBodyPart)->
the m_pSubModel has the same nature.