1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-05 15:40:10 +00:00

Fix parsing of some key lists

It seems some still want you to read the interpolation type even when there's
no keys.
This commit is contained in:
Chris Robinson 2012-07-14 09:20:09 -07:00
parent 939d0d2fc5
commit 5a381006e5
2 changed files with 5 additions and 4 deletions

View File

@ -396,7 +396,7 @@ struct NiMorphData : public Record
mMorphs.resize(morphCount);
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++)

View File

@ -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);