mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 20:19:57 +00:00
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;
|
||||
|
||||
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 ());
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include <stdexcept>
|
||||
#include <vector>
|
||||
#include <cassert>
|
||||
#include <typeinfo>
|
||||
|
||||
#include <boost/weak_ptr.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
@ -137,8 +138,8 @@ template<typename T>
|
|||
struct KeyT {
|
||||
float mTime;
|
||||
T mValue;
|
||||
T mForwardValue; // Only for Quadratic interpolation
|
||||
T mBackwardValue; // Only for Quadratic interpolation
|
||||
T mForwardValue; // Only for Quadratic interpolation, and never for QuaternionKeyList
|
||||
T mBackwardValue; // Only for Quadratic interpolation, and never for QuaternionKeyList
|
||||
float mTension; // Only for TBC interpolation
|
||||
float mBias; // Only for TBC interpolation
|
||||
float mContinuity; // Only for TBC interpolation
|
||||
|
@ -184,8 +185,11 @@ struct KeyListT {
|
|||
KeyT<T> &key = mKeys[i];
|
||||
key.mTime = nif->getFloat();
|
||||
key.mValue = (nif->*getValue)();
|
||||
key.mForwardValue = (nif->*getValue)();
|
||||
key.mBackwardValue = (nif->*getValue)();
|
||||
if( typeid(Ogre::Quaternion) != typeid(T) )
|
||||
{
|
||||
key.mForwardValue = (nif->*getValue)();
|
||||
key.mBackwardValue = (nif->*getValue)();
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(mInterpolationType == sTBCInterpolation)
|
||||
|
|
Loading…
Reference in a new issue