1
0
mirror of synced 2024-11-12 02:00:50 +01:00

Skip textures with the same data position

This commit is contained in:
KillzXGaming 2019-03-29 18:18:29 -04:00
parent 93830c84e1
commit 6afce74460
6 changed files with 6 additions and 1 deletions

Binary file not shown.

View File

@ -349,7 +349,12 @@ namespace FirstPlugin
if (!textureInfo.IsEmpty()) if (!textureInfo.IsEmpty())
{ {
DrawableTex.Add(textureInfo); DrawableTex.Add(textureInfo);
header.Textures.Add(textureInfo);
bool HasImage = header.Textures.Any(item => item.DataPos == textureInfo.DataPos);
if (!HasImage)
{
header.Textures.Add(textureInfo);
}
} }
} }
reader.Seek(pos + 1616, SeekOrigin.Begin); reader.Seek(pos + 1616, SeekOrigin.Begin);