OBJ Models: fixed a crash that occurred when the usemtl directive had the texture to use in quotes. Fixes #758

This commit is contained in:
biwa 2022-07-13 23:25:10 +02:00
parent fd68806dc6
commit 27ba367174

View file

@ -1425,8 +1425,11 @@ namespace CodeImp.DoomBuilder.GZBuilder.MD3
worldvertices.Clear();
polyindiceslist.Clear();
}
// Add texture name. It might be in quotes, so remove them.
// See https://github.com/jewalky/UltimateDoomBuilder/issues/758
if (fields.Length >= 2)
result.Skins.Add(fields[1]);
result.Skins.Add(fields[1].Replace("\"", ""));
surfaceskinid++;
break;