From cf1031fc63a19bfebc82744ab4b1ed55a3868408 Mon Sep 17 00:00:00 2001 From: Robert Špalek Date: Sun, 27 Sep 2009 18:51:07 +0000 Subject: Fix renumbering of animation indexes svn-id: r44414 --- engines/draci/animation.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/draci') diff --git a/engines/draci/animation.cpp b/engines/draci/animation.cpp index 746d577d3a..e3f87feb8b 100644 --- a/engines/draci/animation.cpp +++ b/engines/draci/animation.cpp @@ -515,8 +515,8 @@ void AnimationManager::deleteAnimation(int id) { // Iterate the second time to decrease indexes greater than the deleted animation index for (it = _animations.begin(); it != _animations.end(); ++it) { - if ((*it)->getIndex() == index && (*it)->getIndex() != kIgnoreIndex) { - (*it)->setIndex(index-1); + if ((*it)->getIndex() > index && (*it)->getIndex() != kIgnoreIndex) { + (*it)->setIndex((*it)->getIndex() - 1); } } -- cgit v1.2.3