From d42a7459d7a24ee92acb58e1a31a19ebe16a8bbc Mon Sep 17 00:00:00 2001 From: MaxED Date: Mon, 3 Jun 2013 11:55:55 +0000 Subject: [PATCH] MD2 models with more than 32768 vertices were not loaded properly. --- Source/Core/GZBuilder/md3/ModelReader.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Source/Core/GZBuilder/md3/ModelReader.cs b/Source/Core/GZBuilder/md3/ModelReader.cs index 56d5584f..a5ca0190 100644 --- a/Source/Core/GZBuilder/md3/ModelReader.cs +++ b/Source/Core/GZBuilder/md3/ModelReader.cs @@ -397,13 +397,13 @@ namespace CodeImp.DoomBuilder.GZBuilder.MD3 s.Position = ofs_tris + start; for (int i = 0; i < num_tris; i++) { - polyIndecesList.Add((int)br.ReadInt16()); - polyIndecesList.Add((int)br.ReadInt16()); - polyIndecesList.Add((int)br.ReadInt16()); + polyIndecesList.Add((int)br.ReadUInt16()); + polyIndecesList.Add((int)br.ReadUInt16()); + polyIndecesList.Add((int)br.ReadUInt16()); - uvIndecesList.Add((int)br.ReadInt16()); - uvIndecesList.Add((int)br.ReadInt16()); - uvIndecesList.Add((int)br.ReadInt16()); + uvIndecesList.Add((int)br.ReadUInt16()); + uvIndecesList.Add((int)br.ReadUInt16()); + uvIndecesList.Add((int)br.ReadUInt16()); } //UV coords