From d74df61ce5cf6033655d13bc06b46b5aa8843b67 Mon Sep 17 00:00:00 2001 From: Alexei Kotov Date: Tue, 15 Aug 2023 23:52:55 +0300 Subject: [PATCH] Load FO4 acoustic space records --- components/esm4/loadaspc.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/components/esm4/loadaspc.cpp b/components/esm4/loadaspc.cpp index 0cb3590404..d79df9d8ef 100644 --- a/components/esm4/loadaspc.cpp +++ b/components/esm4/loadaspc.cpp @@ -56,10 +56,16 @@ void ESM4::AcousticSpace::load(ESM4::Reader& reader) case ESM4::SUB_INAM: reader.get(mIsInterior); break; - case ESM4::SUB_WNAM: // usually 0 for FONV (maybe # of close Actors for Walla to trigger) + case ESM4::SUB_XTRI: + std::uint8_t isInterior; + reader.get(isInterior); + mIsInterior = isInterior; + break; + case ESM4::SUB_WNAM: { - std::uint32_t dummy; - reader.get(dummy); + // usually 0 for FONV (maybe # of close Actors for Walla to trigger) (4 bytes) + // Weather attenuation in FO4 (2 bytes) + reader.skipSubRecordData(); break; } case ESM4::SUB_BNAM: // TES5 reverb formid