From 92ed53c6e2ab8d1fc1c58d5a8772ccdb61d4d2b2 Mon Sep 17 00:00:00 2001 From: zingballyhoo Date: Fri, 23 Aug 2024 09:54:32 +0100 Subject: [PATCH] tank: dont break please --- TACTLib/Core/Product/Tank/ResourceGraph.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/TACTLib/Core/Product/Tank/ResourceGraph.cs b/TACTLib/Core/Product/Tank/ResourceGraph.cs index 3553c85..f2346c1 100644 --- a/TACTLib/Core/Product/Tank/ResourceGraph.cs +++ b/TACTLib/Core/Product/Tank/ResourceGraph.cs @@ -101,8 +101,8 @@ public struct TRGHeader { // version 11 public int m_typeBundleIndexBlockSize; // 44 public uint m_48; // 48 public uint m_52; // 52 - public uint m_56; // 56 - public uint m_60; // 60 + public uint m_56; // 56 - new + public uint m_60; // 60 - new public int m_graphBlockSize; // 64 public uint m_footerMagic; // 68 @@ -229,9 +229,7 @@ public ResourceGraph(ClientHandler client, Stream stream, string name) { if (IsPre152(m_header)) { stream.Position = 0; m_header = reader.Read().Upgrade(); - } - - if (IsPre212(m_header)) { + } else if (IsPre212(m_header)) { stream.Position = 0; m_header = reader.Read().Upgrade(); } @@ -242,6 +240,7 @@ public ResourceGraph(ClientHandler client, Stream stream, string name) { } // version 10: added extra entries to skin assets.. for trg runtime overrides (instead of on the skin asset) + // version 11: 2 new header fields, unknown var isEnc = m_header.IsEncrypted();