mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-02-21 11:20:58 +00:00
Fixed skin remapping method
This commit is contained in:
parent
85f00ab9d7
commit
260ffbe57b
3 changed files with 15 additions and 7 deletions
|
@ -396,15 +396,23 @@ namespace CodeImp.DoomBuilder.GZBuilder.MD3
|
|||
vertices[i].nz = -nsum.z / total;
|
||||
}
|
||||
|
||||
List<int> exGroups = new List<int>();
|
||||
Dictionary<int, int> textureGroupRemap = new Dictionary<int, int>();
|
||||
int topGrp = 0;
|
||||
for (int i = 0; i < polys.Length; i++)
|
||||
{
|
||||
if (textureGroupRemap.ContainsKey(polys[i].TexNum))
|
||||
if (exGroups.Contains(polys[i].TexNum))
|
||||
continue;
|
||||
textureGroupRemap[polys[i].TexNum] = topGrp++;
|
||||
if (exGroups.Count == 0 ||
|
||||
polys[i].TexNum <= exGroups[0])
|
||||
exGroups.Insert(0, polys[i].TexNum);
|
||||
else if (exGroups.Count == 0 ||
|
||||
polys[i].TexNum >= exGroups[exGroups.Count - 1])
|
||||
exGroups.Add(polys[i].TexNum);
|
||||
}
|
||||
|
||||
for (int i = 0; i < exGroups.Count; i++)
|
||||
textureGroupRemap[exGroups[i]] = i;
|
||||
|
||||
if (skins == null)
|
||||
{
|
||||
List<WorldVertex> out_verts = new List<WorldVertex>();
|
||||
|
@ -427,7 +435,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.MD3
|
|||
}
|
||||
else
|
||||
{
|
||||
for (int k = 0; k < topGrp; k++)
|
||||
for (int k = 0; k < exGroups.Count; k++)
|
||||
{
|
||||
List<WorldVertex> out_verts = new List<WorldVertex>();
|
||||
List<int> out_polys = new List<int>();
|
||||
|
|
|
@ -30,6 +30,6 @@ using CodeImp.DoomBuilder;
|
|||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("2.3.0.3022")]
|
||||
[assembly: AssemblyVersion("2.3.0.3023")]
|
||||
[assembly: NeutralResourcesLanguageAttribute("en")]
|
||||
[assembly: AssemblyHash("634ba54")]
|
||||
[assembly: AssemblyHash("85f00ab")]
|
||||
|
|
|
@ -29,5 +29,5 @@ using System.Resources;
|
|||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("2.3.0.3022")]
|
||||
[assembly: AssemblyVersion("2.3.0.3023")]
|
||||
[assembly: NeutralResourcesLanguageAttribute("en")]
|
||||
|
|
Loading…
Reference in a new issue