mute error messages while probing default model skins
Unless otherwise specified in a config file, every model (md2 or md3) tries to load skin.jpg, skin.png, ../skin.jpg and ../skin.png (in that order). This commit silences the errors if some of those attempts fail. There is still an error message, if none of the four files can be found. The commit also deletes five identical skin.jpg and places one in ../
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 16 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 16 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 16 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
@@ -843,6 +843,8 @@ int findanim(const char *name)
|
||||
|
||||
void loadskin(const char *dir, const char *altdir, Texture *&skin) // model skin sharing
|
||||
{
|
||||
bool old_silent_texture_load = silent_texture_load;
|
||||
silent_texture_load = true;
|
||||
#define ifnoload if((skin = textureload(path))==notexture)
|
||||
defformatstring(path)("packages/models/%s/skin.jpg", dir);
|
||||
ifnoload
|
||||
@@ -854,10 +856,11 @@ void loadskin(const char *dir, const char *altdir, Texture *&skin) // model skin
|
||||
ifnoload
|
||||
{
|
||||
strcpy(path+strlen(path)-3, "png");
|
||||
ifnoload return;
|
||||
ifnoload {};
|
||||
}
|
||||
}
|
||||
}
|
||||
silent_texture_load = old_silent_texture_load;
|
||||
}
|
||||
|
||||
void preload_playermodels()
|
||||
|
||||
Reference in New Issue
Block a user