diff --git a/src/Blamite/Blam/SecondGen/Structures/SecondGenHeader.cs b/src/Blamite/Blam/SecondGen/Structures/SecondGenHeader.cs index 09d550f28..7701c1364 100644 --- a/src/Blamite/Blam/SecondGen/Structures/SecondGenHeader.cs +++ b/src/Blamite/Blam/SecondGen/Structures/SecondGenHeader.cs @@ -1,5 +1,6 @@ using Blamite.Serialization; using Blamite.IO; +using System; namespace Blamite.Blam.SecondGen.Structures { @@ -98,6 +99,13 @@ public StructureValueCollection Serialize() private void Load(StructureValueCollection values, FileSegmenter segmenter) { + if (values.HasInteger("flags")) + { + int flags = (int)values.GetInteger("flags"); + if ((flags & 1) > 0) + throw new ArgumentException("Map claims to be compressed. Please decompress it using the Tools menu before trying to load it again."); + } + uint filesize = (uint)values.GetInteger("file size"); uint metaOffset = (uint)values.GetInteger("meta offset");