Fix parsing of some key lists

It seems some still want you to read the interpolation type even when there's
no keys.
pull/21/head
Chris Robinson 13 years ago
parent 939d0d2fc5
commit 5a381006e5

@ -394,9 +394,9 @@ struct NiMorphData : public Record
nif->getChar();
mMorphs.resize(morphCount);
for(int i=0; i<morphCount; i++)
for(int i = 0;i < morphCount;i++)
{
mMorphs[i].mData.read(nif);
mMorphs[i].mData.read(nif, true);
mMorphs[i].mVertices.resize(vertCount);
for(int j = 0;j < vertCount;j++)

@ -263,10 +263,11 @@ struct KeyListT {
int mInterpolationType;
VecType mKeys;
void read(NIFFile *nif)
void read(NIFFile *nif, bool force=false)
{
size_t count = nif->getInt();
if(count == 0) return;
if(count == 0 && !force)
return;
mInterpolationType = nif->getInt();
mKeys.resize(count);

Loading…
Cancel
Save