From 0a514db0b54e70195e711853a21109e62e6c2bc0 Mon Sep 17 00:00:00 2001 From: Alexei Kotov Date: Wed, 16 Aug 2023 19:50:58 +0300 Subject: [PATCH] Skip more FO4 navmesh data --- components/esm4/loadnavm.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/components/esm4/loadnavm.cpp b/components/esm4/loadnavm.cpp index 0032d9b084..46d67f094d 100644 --- a/components/esm4/loadnavm.cpp +++ b/components/esm4/loadnavm.cpp @@ -194,6 +194,7 @@ void ESM4::NavMesh::load(ESM4::Reader& reader) mId = reader.getFormIdFromHeader(); mFlags = reader.hdr().record.flags; + std::uint32_t esmVer = reader.esmVersion(); // std::cout << "NavMesh 0x" << std::hex << this << std::endl; // FIXME std::uint32_t subSize = 0; // for XXXX sub record @@ -210,6 +211,13 @@ void ESM4::NavMesh::load(ESM4::Reader& reader) { case ESM4::SUB_NVNM: { + // FIXME: FO4 appears to have a different format + if (esmVer == 0x3F800000) + { + reader.skipSubRecordData(); + break; + } + NVNMstruct nvnm; nvnm.load(reader); mData.push_back(nvnm); // FIXME try swap @@ -245,6 +253,7 @@ void ESM4::NavMesh::load(ESM4::Reader& reader) case ESM4::SUB_NVGD: // FO3 case ESM4::SUB_NVEX: // FO3 case ESM4::SUB_EDID: // FO3 + case ESM4::SUB_MNAM: // FO4 reader.skipSubRecordData(); break; default: