- More model texture loading weirdness is now regarded

This commit is contained in:
biwa 2019-06-16 19:31:44 +02:00
parent c2b18a913e
commit 34f2c308bd

View file

@ -192,10 +192,20 @@ namespace CodeImp.DoomBuilder.GZBuilder.MD3
Texture t = GetTexture(containers, path, device);
if(t == null)
if(t != null)
{
mde.Model.Textures.Add(t);
continue;
}
// That didn't work, let's try to load the texture without the additional path
path = result.Skins[m].Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar);
t = GetTexture(containers, path, device);
if (t == null)
{
mde.Model.Textures.Add(General.Map.Data.UnknownTexture3D.Texture);
errors.Add("unable to load skin \"" + result.Skins[m] + "\"");
errors.Add("unable to load skin \"" + path + "\"");
continue;
}