diff --git a/components/nif/controller.cpp b/components/nif/controller.cpp index dd4261edd7..32291b8c12 100644 --- a/components/nif/controller.cpp +++ b/components/nif/controller.cpp @@ -432,9 +432,15 @@ namespace Nif { Controller::read(nif); mCumulative = nif->getBoolean(); - unsigned int numSequences = nif->getUInt(); - nif->skip(4 * numSequences); // Controller sequences - nif->skip(4); // Object palette + readRecordList(nif, mSequences); + mObjectPalette.read(nif); + } + + void NiControllerManager::post(Reader& nif) + { + Controller::post(nif); + postRecordList(nif, mSequences); + mObjectPalette.post(nif); } void NiPoint3Interpolator::read(NIFStream* nif) diff --git a/components/nif/controller.hpp b/components/nif/controller.hpp index ff90f55dee..3f9c054906 100644 --- a/components/nif/controller.hpp +++ b/components/nif/controller.hpp @@ -296,7 +296,10 @@ namespace Nif struct NiControllerManager : public Controller { bool mCumulative; + NiControllerSequenceList mSequences; + NiDefaultAVObjectPalettePtr mObjectPalette; void read(NIFStream* nif) override; + void post(Reader& nif) override; }; struct NiInterpolator : public Record diff --git a/components/nif/recordptr.hpp b/components/nif/recordptr.hpp index b7ad9d3dbb..5fa0d7d203 100644 --- a/components/nif/recordptr.hpp +++ b/components/nif/recordptr.hpp @@ -143,6 +143,8 @@ namespace Nif struct NiStringPalette; struct NiControllerManager; struct NiBlendInterpolator; + struct NiDefaultAVObjectPalette; + struct NiControllerSequence; using NodePtr = RecordPtrT; using ExtraPtr = RecordPtrT; @@ -176,6 +178,7 @@ namespace Nif using NiStringPalettePtr = RecordPtrT; using NiControllerManagerPtr = RecordPtrT; using NiBlendInterpolatorPtr = RecordPtrT; + using NiDefaultAVObjectPalettePtr = RecordPtrT; using NodeList = RecordListT; using PropertyList = RecordListT; @@ -185,6 +188,7 @@ namespace Nif using NiTriStripsDataList = RecordListT; using bhkShapeList = RecordListT; using bhkSerializableList = RecordListT; + using NiControllerSequenceList = RecordListT; } // Namespace #endif