Skip to content
Snippets Groups Projects
Commit 36983329 authored by Amorilia's avatar Amorilia
Browse files

Fixed tree writing bug for test case (will fix code generator in next commit).

parent 2d56b4d8
No related branches found
No related tags found
No related merge requests found
......@@ -86,12 +86,18 @@ void NiTimeController::Write( ostream& out, const map<NiObjectRef,unsigned int>
if ( info.version < VER_3_3_0_13 ) {
WritePtr32( &(*target), out );
} else {
if ( target != NULL ) {
NifStream( link_map.find( StaticCast<NiObject>(target) )->second, out, info );
} else {
NifStream( 0xFFFFFFFF, out, info );
}
}
if ( target != NULL ) {
map<NiObjectRef,unsigned int>::const_iterator it = link_map.find( StaticCast<NiObject>(target) );
if (it != link_map.end()) {
NifStream( it->second, out, info );
} else {
//std::cerr << "warning: referenced block not in tree; omitting" << std::endl;
NifStream( 0xFFFFFFFF, out, info );
}
} else {
NifStream( 0xFFFFFFFF, out, info );
}
}
};
if ( info.version <= 0x03010000 ) {
NifStream( unknownInteger, out, info );
......
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