From eda0633c4ea05bf846b1032f9ebd727eced8d0ee Mon Sep 17 00:00:00 2001 From: Spoike Date: Wed, 15 Mar 2006 20:07:43 +0000 Subject: [PATCH] This needs a proper fix some time, but I don't want to be the one to do it, it's hideous! Hrm, colormap stuff... I dunno. This works well enough for most q3 mods. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2122 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/gl/gl_alias.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/engine/gl/gl_alias.c b/engine/gl/gl_alias.c index 2d31b82a2..14e136b6c 100644 --- a/engine/gl/gl_alias.c +++ b/engine/gl/gl_alias.c @@ -1274,7 +1274,11 @@ static galiastexnum_t *GL_ChooseSkin(galiasinfo_t *inf, char *modelname, int sur if (e->skinnum >= 0 && e->skinnum < inf->numskins) skins += e->skinnum; else + { Con_DPrintf("Skin number out of range\n"); + if (!inf->numskins) + return NULL; + } if (!skins->texnums) return NULL; @@ -2863,8 +2867,13 @@ int GL_BuildSkinFileList(char *modelname) } } - COM_EnumerateFiles(va("%s_*.skin", modelname), GL_EnumerateSkins, NULL); - COM_EnumerateFiles(va("%s_*.skin", skinfilename), GL_EnumerateSkins, NULL); +// if (strstr(modelname, "lower") || strstr(modelname, "upper") || strstr(modelname, "head")) +// { + COM_EnumerateFiles(va("%s_*.skin", modelname), GL_EnumerateSkins, NULL); + COM_EnumerateFiles(va("%s_*.skin", skinfilename), GL_EnumerateSkins, NULL); +// } +// else +// COM_EnumerateFiles("*.skin", GL_EnumerateSkins, NULL); return skinfilecount; }