From 035a973f9101acf035d360f5dabcd4b006cca57f Mon Sep 17 00:00:00 2001 From: Carmine Date: Sun, 4 Mar 2018 17:18:25 +0100 Subject: [PATCH] GtxdFile: Added BOM check required for some vanilla gtxd.meta --- CodeWalker.Core/GameFiles/FileTypes/GtxdFile.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CodeWalker.Core/GameFiles/FileTypes/GtxdFile.cs b/CodeWalker.Core/GameFiles/FileTypes/GtxdFile.cs index e0ee813..53dcaf3 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/GtxdFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/GtxdFile.cs @@ -59,7 +59,15 @@ namespace CodeWalker.GameFiles } else if (entry.NameLower.EndsWith(".meta")) { + //required for update\x64\dlcpacks\mpheist\dlc.rpf\common\data\gtxd.meta and update\x64\dlcpacks\mpluxe\dlc.rpf\common\data\gtxd.meta + string bom = Encoding.UTF8.GetString(Encoding.UTF8.GetPreamble()); string xml = Encoding.UTF8.GetString(data); + + if (xml.StartsWith(bom, StringComparison.Ordinal)) + { + xml = xml.Remove(0, bom.Length); + } + LoadMapParentTxds(xml); Loaded = true; }