1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 17:59:56 +00:00

Skip more FO4 navmesh data

This commit is contained in:
Alexei Kotov 2023-08-16 19:50:58 +03:00
parent 10e841b00f
commit 0a514db0b5

View file

@ -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: