1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-06 00:40:04 +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

@ -394,9 +394,9 @@ struct NiMorphData : public Record
nif->getChar(); nif->getChar();
mMorphs.resize(morphCount); 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); mMorphs[i].mVertices.resize(vertCount);
for(int j = 0;j < vertCount;j++) for(int j = 0;j < vertCount;j++)

View File

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