mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-19 06:51:09 +00:00
- Fixed a crash when loading OBJ models with faces without normals
This commit is contained in:
parent
d2452abe5c
commit
c00a8995aa
1 changed files with 2 additions and 2 deletions
|
@ -1653,12 +1653,12 @@ namespace CodeImp.DoomBuilder.GZBuilder.MD3
|
|||
|
||||
face.Add(int.Parse(vertexdata[0], CultureInfo.InvariantCulture) - 1);
|
||||
|
||||
if (vertexdata.Length >= 1 && vertexdata[1] != "")
|
||||
if (vertexdata.Length > 1 && vertexdata[1] != "")
|
||||
texcoords.Add(int.Parse(vertexdata[1], CultureInfo.InvariantCulture) - 1);
|
||||
else
|
||||
texcoords.Add(-1);
|
||||
|
||||
if (vertexdata.Length >= 2 && vertexdata[2] != "")
|
||||
if (vertexdata.Length > 2 && vertexdata[2] != "")
|
||||
normals.Add(int.Parse(vertexdata[2], CultureInfo.InvariantCulture) - 1);
|
||||
else
|
||||
normals.Add(-1);
|
||||
|
|
Loading…
Reference in a new issue