forked from mirror/openmw-tes3mp
Fix Bug #1371
Not properly reading in the NIF file's QuaternionKeyList.
This commit is contained in:
parent
538aa6607e
commit
576c06d791
2 changed files with 10 additions and 4 deletions
|
@ -318,6 +318,8 @@ void NIFFile::parse()
|
||||||
Record *r = NULL;
|
Record *r = NULL;
|
||||||
|
|
||||||
std::string rec = nif.getString();
|
std::string rec = nif.getString();
|
||||||
|
if(rec.empty())
|
||||||
|
fail("Record number " + Ogre::StringConverter::toString(i) + " out of " + Ogre::StringConverter::toString(recNum) + " is blank.");
|
||||||
|
|
||||||
RecordFactoryEntry const * entry = lookupRecordFactory (rec.c_str ());
|
RecordFactoryEntry const * entry = lookupRecordFactory (rec.c_str ());
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
#include <typeinfo>
|
||||||
|
|
||||||
#include <boost/weak_ptr.hpp>
|
#include <boost/weak_ptr.hpp>
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
|
@ -137,8 +138,8 @@ template<typename T>
|
||||||
struct KeyT {
|
struct KeyT {
|
||||||
float mTime;
|
float mTime;
|
||||||
T mValue;
|
T mValue;
|
||||||
T mForwardValue; // Only for Quadratic interpolation
|
T mForwardValue; // Only for Quadratic interpolation, and never for QuaternionKeyList
|
||||||
T mBackwardValue; // Only for Quadratic interpolation
|
T mBackwardValue; // Only for Quadratic interpolation, and never for QuaternionKeyList
|
||||||
float mTension; // Only for TBC interpolation
|
float mTension; // Only for TBC interpolation
|
||||||
float mBias; // Only for TBC interpolation
|
float mBias; // Only for TBC interpolation
|
||||||
float mContinuity; // Only for TBC interpolation
|
float mContinuity; // Only for TBC interpolation
|
||||||
|
@ -184,8 +185,11 @@ struct KeyListT {
|
||||||
KeyT<T> &key = mKeys[i];
|
KeyT<T> &key = mKeys[i];
|
||||||
key.mTime = nif->getFloat();
|
key.mTime = nif->getFloat();
|
||||||
key.mValue = (nif->*getValue)();
|
key.mValue = (nif->*getValue)();
|
||||||
key.mForwardValue = (nif->*getValue)();
|
if( typeid(Ogre::Quaternion) != typeid(T) )
|
||||||
key.mBackwardValue = (nif->*getValue)();
|
{
|
||||||
|
key.mForwardValue = (nif->*getValue)();
|
||||||
|
key.mBackwardValue = (nif->*getValue)();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(mInterpolationType == sTBCInterpolation)
|
else if(mInterpolationType == sTBCInterpolation)
|
||||||
|
|
Loading…
Reference in a new issue