Untitled
unknown
plain_text
a year ago
534 B
4
Indexable
static void Mod_LoadTextures(model_t *mod, dbspmodel_t *bmod) {
dmiptexlump_t *lump = bmod->textures;
if(bmod->texdatasize < 1 || !lump || lump->nummiptex < 1) {
mod->textures = NULL;
return;
}
// Reduce allocated texture count
int reduced_count = lump->nummiptex / 2; // Or set fixed number like 32
mod->textures = Mem_Calloc(mod->mempool, reduced_count * sizeof(texture_t *));
mod->numtextures = reduced_count;
Mod_LoadAllTextures(mod, bmod); // Using existing function instead
}Editor is loading...
Leave a Comment