diff --git a/components/nif/nif_file.cpp b/components/nif/nif_file.cpp index 3db34e0cc6..6b024ab68e 100644 --- a/components/nif/nif_file.cpp +++ b/components/nif/nif_file.cpp @@ -39,9 +39,8 @@ //#include //#include -using namespace std; -using namespace Nif; -using namespace Misc; +namespace Nif +{ class NIFFile::LoadedCache { @@ -311,6 +310,7 @@ void NIFFile::parse() assert(r != NULL); assert(r->recType != RC_MISSING); r->recName = rec; + r->recIndex = i; records[i] = r; r->read(this); @@ -329,9 +329,6 @@ void NIFFile::parse() tree, but for the moment we ignore it. */ - // TODO: Set up kf file here first, if applicable. It needs its own - // code to link it up with the main NIF structure. - // Once parsing is done, do post-processing. for(int i=0; ipost(this); @@ -375,3 +372,5 @@ Ogre::Matrix4 Node::getWorldTransform() const return parent->getWorldTransform() * getLocalTransform(); return getLocalTransform(); } + +} diff --git a/components/nif/record.hpp b/components/nif/record.hpp index 5c4141fa98..d5f65e83a3 100644 --- a/components/nif/record.hpp +++ b/components/nif/record.hpp @@ -91,8 +91,9 @@ struct Record // Record type and type name int recType; std::string recName; + size_t recIndex; - Record() : recType(RC_MISSING) {} + Record() : recType(RC_MISSING), recIndex(~(size_t)0) {} /// Parses the record from file virtual void read(NIFFile *nif) = 0;