forked from mirror/openmw-tes3mp
Store the NIF index in the Record object
This commit is contained in:
parent
ecdd89a4f3
commit
660d73fd88
2 changed files with 7 additions and 7 deletions
|
@ -39,9 +39,8 @@
|
||||||
//#include <boost/mutex.hpp>
|
//#include <boost/mutex.hpp>
|
||||||
//#include <boost/thread/locks.hpp>
|
//#include <boost/thread/locks.hpp>
|
||||||
|
|
||||||
using namespace std;
|
namespace Nif
|
||||||
using namespace Nif;
|
{
|
||||||
using namespace Misc;
|
|
||||||
|
|
||||||
class NIFFile::LoadedCache
|
class NIFFile::LoadedCache
|
||||||
{
|
{
|
||||||
|
@ -311,6 +310,7 @@ void NIFFile::parse()
|
||||||
assert(r != NULL);
|
assert(r != NULL);
|
||||||
assert(r->recType != RC_MISSING);
|
assert(r->recType != RC_MISSING);
|
||||||
r->recName = rec;
|
r->recName = rec;
|
||||||
|
r->recIndex = i;
|
||||||
records[i] = r;
|
records[i] = r;
|
||||||
r->read(this);
|
r->read(this);
|
||||||
|
|
||||||
|
@ -329,9 +329,6 @@ void NIFFile::parse()
|
||||||
tree, but for the moment we ignore it.
|
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.
|
// Once parsing is done, do post-processing.
|
||||||
for(int i=0; i<recNum; i++)
|
for(int i=0; i<recNum; i++)
|
||||||
records[i]->post(this);
|
records[i]->post(this);
|
||||||
|
@ -375,3 +372,5 @@ Ogre::Matrix4 Node::getWorldTransform() const
|
||||||
return parent->getWorldTransform() * getLocalTransform();
|
return parent->getWorldTransform() * getLocalTransform();
|
||||||
return getLocalTransform();
|
return getLocalTransform();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -91,8 +91,9 @@ struct Record
|
||||||
// Record type and type name
|
// Record type and type name
|
||||||
int recType;
|
int recType;
|
||||||
std::string recName;
|
std::string recName;
|
||||||
|
size_t recIndex;
|
||||||
|
|
||||||
Record() : recType(RC_MISSING) {}
|
Record() : recType(RC_MISSING), recIndex(~(size_t)0) {}
|
||||||
|
|
||||||
/// Parses the record from file
|
/// Parses the record from file
|
||||||
virtual void read(NIFFile *nif) = 0;
|
virtual void read(NIFFile *nif) = 0;
|
||||||
|
|
Loading…
Reference in a new issue