aboutsummaryrefslogtreecommitdiff
path: root/engines/draci
diff options
context:
space:
mode:
authorRobert Špalek2009-10-12 00:39:49 +0000
committerRobert Špalek2009-10-12 00:39:49 +0000
commitca35af26976c0499b83ff3b434ae3d7b9eaef33f (patch)
treea80b918e42a6707439cc04858825a834a2a143af /engines/draci
parentb99e69f4d9a4ec864d5b6f26787d1841e4bdc56d (diff)
downloadscummvm-rg350-ca35af26976c0499b83ff3b434ae3d7b9eaef33f.tar.gz
scummvm-rg350-ca35af26976c0499b83ff3b434ae3d7b9eaef33f.tar.bz2
scummvm-rg350-ca35af26976c0499b83ff3b434ae3d7b9eaef33f.zip
Fixed funcActPhase()
svn-id: r44963
Diffstat (limited to 'engines/draci')
-rw-r--r--engines/draci/script.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/engines/draci/script.cpp b/engines/draci/script.cpp
index a090ee6b86..03ce26eec1 100644
--- a/engines/draci/script.cpp
+++ b/engines/draci/script.cpp
@@ -338,13 +338,13 @@ int Script::funcActPhase(int objID) const {
bool visible = (obj->_location == _vm->_game->getRoomNum() && obj->_visible);
if (objID == kDragonObject || visible) {
- // FIXME: we should check which animation is active and return
- // the phase of it, instead of the first one. this function
- // is only used at 3 places of the game, hence possible
- // breakage may not show easily.
- int animID = obj->_anim[0];
- Animation *anim = _vm->_anims->getAnimation(animID);
- ret = anim->currentFrameNum();
+ for (uint i = 0; i < obj->_anim.size(); ++i) {
+ int animID = obj->_anim[i];
+ Animation *anim = _vm->_anims->getAnimation(animID);
+ if (anim && anim->isPlaying()) {
+ ret = anim->currentFrameNum();
+ }
+ }
}
return ret;