[Scummvm-cvs-logs] SF.net SVN: scummvm:[44963] scummvm/trunk/engines/draci/script.cpp
spalek at users.sourceforge.net
spalek at users.sourceforge.net
Mon Oct 12 02:39:49 CEST 2009
Revision: 44963
http://scummvm.svn.sourceforge.net/scummvm/?rev=44963&view=rev
Author: spalek
Date: 2009-10-12 00:39:49 +0000 (Mon, 12 Oct 2009)
Log Message:
-----------
Fixed funcActPhase()
Modified Paths:
--------------
scummvm/trunk/engines/draci/script.cpp
Modified: scummvm/trunk/engines/draci/script.cpp
===================================================================
--- scummvm/trunk/engines/draci/script.cpp 2009-10-12 00:32:51 UTC (rev 44962)
+++ scummvm/trunk/engines/draci/script.cpp 2009-10-12 00:39:49 UTC (rev 44963)
@@ -338,13 +338,13 @@
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;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list