git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12141
d7cf8633-e32d-0410-b094-
e92efae38249
if (!skeleton->relativetransforms || skeleton->model != model)
{
skeleton->model = model;
- skeleton->relativetransforms = (matrix4x4_t *) Mem_Realloc(cls.levelmempool, skeleton->relativetransforms, sizeof(*skeleton->relativetransforms) * skeleton->model->num_bones);
- for (bonenum = 0;bonenum < model->num_bones;bonenum++)
+ skeleton->relativetransforms = (matrix4x4_t *) Mem_Realloc(cls.levelmempool, skeleton->relativetransforms, sizeof(*skeleton->relativetransforms) * numbones);
+ for (bonenum = 0;bonenum < numbones;bonenum++)
skeleton->relativetransforms[bonenum] = identitymatrix;
}
for (bonenum = 0;bonenum < numbones;bonenum++)