|
|
@ -1065,7 +1065,9 @@ void Mod_LoadStudioModel( model_t *mod, const void *buffer, qboolean *loaded ) |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
#if !XASH_DEDICATED |
|
|
|
ref.dllFuncs.Mod_StudioLoadTextures( mod, thdr ); |
|
|
|
ref.dllFuncs.Mod_StudioLoadTextures( mod, thdr ); |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
// give space for textures and skinrefs
|
|
|
|
// give space for textures and skinrefs
|
|
|
|
size1 = thdr->numtextures * sizeof( mstudiotexture_t ); |
|
|
|
size1 = thdr->numtextures * sizeof( mstudiotexture_t ); |
|
|
@ -1092,7 +1094,9 @@ void Mod_LoadStudioModel( model_t *mod, const void *buffer, qboolean *loaded ) |
|
|
|
loadmodel->cache.data = Mem_Calloc( loadmodel->mempool, phdr->length ); |
|
|
|
loadmodel->cache.data = Mem_Calloc( loadmodel->mempool, phdr->length ); |
|
|
|
memcpy( loadmodel->cache.data, buffer, phdr->length ); |
|
|
|
memcpy( loadmodel->cache.data, buffer, phdr->length ); |
|
|
|
phdr = (studiohdr_t *)loadmodel->cache.data; // get the new pointer on studiohdr
|
|
|
|
phdr = (studiohdr_t *)loadmodel->cache.data; // get the new pointer on studiohdr
|
|
|
|
|
|
|
|
#if !XASH_DEDICATED |
|
|
|
ref.dllFuncs.Mod_StudioLoadTextures( mod, phdr ); |
|
|
|
ref.dllFuncs.Mod_StudioLoadTextures( mod, phdr ); |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
// NOTE: we wan't keep raw textures in memory. just cutoff model pointer above texture base
|
|
|
|
// NOTE: we wan't keep raw textures in memory. just cutoff model pointer above texture base
|
|
|
|
loadmodel->cache.data = Mem_Realloc( loadmodel->mempool, loadmodel->cache.data, phdr->texturedataindex ); |
|
|
|
loadmodel->cache.data = Mem_Realloc( loadmodel->mempool, loadmodel->cache.data, phdr->texturedataindex ); |
|
|
|