loadnotexture cleanup

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2296 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2008-08-08 08:03:36 +00:00
parent 461c4c5145
commit fce52698aa
+4 -5
View File
@@ -225,13 +225,12 @@ void loadnotexture(char *c)
{
const char *defnotex = "packages/misc/notexture.jpg";
notexture = textureload(defnotex); // reset to default
if(strcmp(c,""))
if(c[0])
{
Texture *missingtex;
s_sprintfd(p)("packages/textures/%s", c);
missingtex = textureload(p);
if(missingtex==notexture) { conoutf("could not load alternative texture '%s'.", p); s_sprintf(p)(defnotex); }
notexture = textureload(p);
Texture *missingtex = textureload(p);
if(missingtex==notexture) { conoutf("could not load alternative texture '%s'.", p); s_strcpy(p, defnotex); }
else notexture = missingtex;
conoutf("using '%s' as alternative texture", p);
}
}