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.) {
// Position keys
for (unsigned int i = 0; i < channel->mNumPositionKeys;++i) {
aiVectorKey& key = channel->mPositionKeys[i];
for (unsigned int j = 0; j < channel->mNumPositionKeys;++j) {
aiVectorKey& key = channel->mPositionKeys[j];
first = std::min (first, key.mTime);
last = std::max (last, key.mTime);
}
// Scaling keys
for (unsigned int i = 0; i < channel->mNumScalingKeys;++i) {
aiVectorKey& key = channel->mScalingKeys[i];
for (unsigned int j = 0; j < channel->mNumScalingKeys;++j ) {
aiVectorKey& key = channel->mScalingKeys[j];
first = std::min (first, key.mTime);
last = std::max (last, key.mTime);
}
// Rotation keys
for (unsigned int i = 0; i < channel->mNumRotationKeys;++i) {
aiQuatKey& key = channel->mRotationKeys[i];
for (unsigned int j = 0; j < channel->mNumRotationKeys;++j ) {
aiQuatKey& key = channel->mRotationKeys[ j ];
first = std::min (first, key.mTime);
last = std::max (last, key.mTime);
}