From 95e834b22e8d94f56a611258f37794e70673322c Mon Sep 17 00:00:00 2001 From: Tazpn <tazpn@users.sourceforge.net> Date: Mon, 25 Jun 2007 00:26:43 +0000 Subject: [PATCH] Another attempt at the NiGeoMorphController --- src/obj/NiGeomMorpherController.cpp | 4 ++-- src/obj/NiMorphData.cpp | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/obj/NiGeomMorpherController.cpp b/src/obj/NiGeomMorpherController.cpp index 559795eb..9603a546 100644 --- a/src/obj/NiGeomMorpherController.cpp +++ b/src/obj/NiGeomMorpherController.cpp @@ -70,7 +70,7 @@ void NiGeomMorpherController::Read( istream& in, list<unsigned int> & link_stack NifStream( unknownInts1[i2], in, info ); }; }; - if ( info.version >= 0x14000005 ) { + if ( ( info.version >= 0x14000004 ) && ( info.userVersion == 10 ) ) { NifStream( numUnknownInts2, in, info ); unknownInts2.resize(numUnknownInts2); for (unsigned int i2 = 0; i2 < unknownInts2.size(); i2++) { @@ -126,7 +126,7 @@ void NiGeomMorpherController::Write( ostream& out, const map<NiObjectRef,unsigne NifStream( unknownInts1[i2], out, info ); }; }; - if ( info.version >= 0x14000005 ) { + if ( ( info.version >= 0x14000004 ) && ( info.userVersion == 10 ) ) { NifStream( numUnknownInts2, out, info ); for (unsigned int i2 = 0; i2 < unknownInts2.size(); i2++) { NifStream( unknownInts2[i2], out, info ); diff --git a/src/obj/NiMorphData.cpp b/src/obj/NiMorphData.cpp index ab907c0d..807c93bf 100644 --- a/src/obj/NiMorphData.cpp +++ b/src/obj/NiMorphData.cpp @@ -59,7 +59,10 @@ void NiMorphData::Read( istream& in, list<unsigned int> & link_stack, const NifI NifStream( morphs[i1].keys[i3], in, info, morphs[i1].interpolation ); }; }; - if ( ( info.version >= 0x0A01006A ) && ( info.version <= 0x14000004 ) ) { + if ( ( info.version >= 0x0A01006A ) && ( info.version <= 0x0A01006A ) ) { + NifStream( morphs[i1].unknownInt, in, info ); + }; + if ( info.version >= 0x14000004 ) { NifStream( morphs[i1].unknownInt, in, info ); }; morphs[i1].vectors.resize(numVertices); @@ -93,7 +96,10 @@ void NiMorphData::Write( ostream& out, const map<NiObjectRef,unsigned int> & lin NifStream( morphs[i1].keys[i3], out, info, morphs[i1].interpolation ); }; }; - if ( ( info.version >= 0x0A01006A ) && ( info.version <= 0x14000004 ) ) { + if ( ( info.version >= 0x0A01006A ) && ( info.version <= 0x0A01006A ) ) { + NifStream( morphs[i1].unknownInt, out, info ); + }; + if ( info.version >= 0x14000004 ) { NifStream( morphs[i1].unknownInt, out, info ); }; for (unsigned int i2 = 0; i2 < morphs[i1].vectors.size(); i2++) { -- GitLab