Mem_Free(vertbonecounts);
Mem_Free(verts);
Mem_Free(outtexcoord2f);
+ Mod_FreeSkinFiles(skinfiles);
}
void Mod_DARKPLACESMODEL_Load(model_t *mod, void *buffer, void *bufferend)
dpmmesh++;
}
+ Mod_FreeSkinFiles(skinfiles);
}
static void Mod_PSKMODEL_AnimKeyToMatrix(float *origin, float *quat, matrix4x4_t *m)
Mod_Alias_Mesh_CompileFrameZero(mesh);
Mem_Free(animfilebuffer);
+ Mod_FreeSkinFiles(skinfiles);
}
// If it's the first file we parse
if (skinfile == NULL)
{
- skinfile = (skinfile_t *)Mem_Alloc(tempmempool, sizeof(skinfile_t));
+ skinfile = (skinfile_t *)Mem_Alloc(loadmodel->mempool, sizeof(skinfile_t));
first = skinfile;
}
else
{
- skinfile->next = (skinfile_t *)Mem_Alloc(tempmempool, sizeof(skinfile_t));
+ skinfile->next = (skinfile_t *)Mem_Alloc(loadmodel->mempool, sizeof(skinfile_t));
skinfile = skinfile->next;
}
skinfile->next = NULL;
if (words == 3)
{
Con_DPrintf("Mod_LoadSkinFiles: parsed mesh \"%s\" shader replacement \"%s\"\n", word[1], word[2]);
- skinfileitem = (skinfileitem_t *)Mem_Alloc(tempmempool, sizeof(skinfileitem_t));
+ skinfileitem = (skinfileitem_t *)Mem_Alloc(loadmodel->mempool, sizeof(skinfileitem_t));
skinfileitem->next = skinfile->items;
skinfile->items = skinfileitem;
strlcpy (skinfileitem->name, word[1], sizeof (skinfileitem->name));
{
// mesh shader name, like "U_RArm,models/players/Legoman/BikerA1.tga"
Con_DPrintf("Mod_LoadSkinFiles: parsed mesh \"%s\" shader replacement \"%s\"\n", word[0], word[2]);
- skinfileitem = (skinfileitem_t *)Mem_Alloc(tempmempool, sizeof(skinfileitem_t));
+ skinfileitem = (skinfileitem_t *)Mem_Alloc(loadmodel->mempool, sizeof(skinfileitem_t));
skinfileitem->next = skinfile->items;
skinfile->items = skinfileitem;
strlcpy (skinfileitem->name, word[0], sizeof (skinfileitem->name));