.mdl model than skins exist in the model, this was caused by texture_t
containing pointers to itself that were broken by the reallocation of
the array
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7113
d7cf8633-e32d-0410-b094-
e92efae38249
//increase skin counts
loadmodel->numskins++;
totalskins++;
+
+ // fix up the pointers since they are pointing at the old textures array
+ // FIXME: this is a hack!
+ for (j = 0;j < loadmodel->numskins * loadmodel->num_surfaces;j++)
+ {
+ loadmodel->data_textures[j].currentframe = &loadmodel->data_textures[j];
+ loadmodel->data_textures[j].currentskinframe = &loadmodel->data_textures[j].skinframes[0];
+ }
}
}