Skip to content
Snippets Groups Projects
Commit 95e834b2 authored by Tazpn's avatar Tazpn
Browse files

Another attempt at the NiGeoMorphController

parent f744425c
No related branches found
No related tags found
No related merge requests found
......@@ -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 );
......
......@@ -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++) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment