diff --git a/src/client/refresh/files/models.c b/src/client/refresh/files/models.c index b46dcd97..81851c6b 100644 --- a/src/client/refresh/files/models.c +++ b/src/client/refresh/files/models.c @@ -2932,7 +2932,19 @@ Mod_LoadModel_MDA_Text(const char *mod_name, char *curr_buff, pheader = (dmdx_t *)extradata; for (i=0; i < pheader->num_skins; i++) { - printf("%s|%s:%s\n", mod_name, base_model, (char *)pheader + pheader->ofs_skins + i*MAX_SKINNAME); + char *skin; + + skin = (char *)pheader + pheader->ofs_skins + i * MAX_SKINNAME; + if (!strchr(skin, '/') && !strchr(skin, '\\')) + { + char skin_path[MAX_QPATH * 2] = {0}; + + strncpy(skin_path, base_model, sizeof(skin_path)); + strcpy(strrchr(skin_path, '/') + 1, skin); + + strncpy(skin, skin_path, MAX_SKINNAME); + printf("%s|%s:%s\n", mod_name, skin_path, skin); + } } }