ScenePreprocessor: fix invalid index counter.

pull/1060/head
Kim Kulling 2016-11-05 18:41:19 +01:00
parent dfaea27dfc
commit 499886f89e
1 changed files with 6 additions and 6 deletions

View File

@ -176,22 +176,22 @@ void ScenePreprocessor::ProcessAnimation (aiAnimation* anim)
if (anim->mDuration == -1.) { if (anim->mDuration == -1.) {
// Position keys // Position keys
for (unsigned int i = 0; i < channel->mNumPositionKeys;++i) { for (unsigned int j = 0; j < channel->mNumPositionKeys;++j) {
aiVectorKey& key = channel->mPositionKeys[i]; aiVectorKey& key = channel->mPositionKeys[j];
first = std::min (first, key.mTime); first = std::min (first, key.mTime);
last = std::max (last, key.mTime); last = std::max (last, key.mTime);
} }
// Scaling keys // Scaling keys
for (unsigned int i = 0; i < channel->mNumScalingKeys;++i) { for (unsigned int j = 0; j < channel->mNumScalingKeys;++j ) {
aiVectorKey& key = channel->mScalingKeys[i]; aiVectorKey& key = channel->mScalingKeys[j];
first = std::min (first, key.mTime); first = std::min (first, key.mTime);
last = std::max (last, key.mTime); last = std::max (last, key.mTime);
} }
// Rotation keys // Rotation keys
for (unsigned int i = 0; i < channel->mNumRotationKeys;++i) { for (unsigned int j = 0; j < channel->mNumRotationKeys;++j ) {
aiQuatKey& key = channel->mRotationKeys[i]; aiQuatKey& key = channel->mRotationKeys[ j ];
first = std::min (first, key.mTime); first = std::min (first, key.mTime);
last = std::max (last, key.mTime); last = std::max (last, key.mTime);
} }