diff --git a/src/client/refresh/files/models.c b/src/client/refresh/files/models.c index 961b0604..35063a46 100644 --- a/src/client/refresh/files/models.c +++ b/src/client/refresh/files/models.c @@ -3023,11 +3023,9 @@ Mod_LoadMinMaxUpdate(const char *mod_name, vec3_t mins, vec3_t maxs, void *extra Mod_LoadModel ================= */ -void * -Mod_LoadModel(const char *mod_name, const void *buffer, int modfilelen, - vec3_t mins, vec3_t maxs, struct image_s ***skins, int *numskins, - findimage_t find_image, loadimage_t load_image, readfile_t read_file, - modtype_t *type) +static void * +Mod_LoadModelFile(const char *mod_name, const void *buffer, int modfilelen, + struct image_s ***skins, int *numskins, readfile_t read_file, modtype_t *type) { void *extradata = NULL; @@ -3104,6 +3102,25 @@ Mod_LoadModel(const char *mod_name, const void *buffer, int modfilelen, break; } + return extradata; +} + +/* +================= +Mod_LoadModel +================= +*/ +void * +Mod_LoadModel(const char *mod_name, const void *buffer, int modfilelen, + vec3_t mins, vec3_t maxs, struct image_s ***skins, int *numskins, + findimage_t find_image, loadimage_t load_image, readfile_t read_file, + modtype_t *type) +{ + void *extradata; + + extradata = Mod_LoadModelFile(mod_name, buffer, modfilelen, skins, numskins, + read_file, type); + if (extradata) { Mod_LoadMinMaxUpdate(mod_name, mins, maxs, extradata, *type);