* Removed some code I forgot to remove in Game::startPlay() (a call to AnimationManager::play())

* Fixed logic checking for object visibility in various GPL commands (I originally misinterpreted the original engine code).

svn-id: r42908
This commit is contained in:
Denis Kasak 2009-07-29 20:41:53 +00:00
parent a2cc4a6479
commit ad752b268b

View File

@ -275,9 +275,9 @@ int Script::funcActPhase(int objID) {
GameObject *obj = _vm->_game->getObject(objID);
bool visible = (objID == kDragonObject || obj->_visible);
bool visible = (obj->_location == _vm->_game->getRoomNum() && obj->_visible);
if (visible && (obj->_location == _vm->_game->getRoomNum())) {
if (objID == kDragonObject || visible) {
int animID = obj->_anims[0];
Animation *anim = _vm->_anims->getAnimation(animID);
ret = anim->currentFrameNum();
@ -355,9 +355,9 @@ void Script::start(Common::Queue<int> &params) {
Animation *anim = _vm->_anims->getAnimation(animID);
anim->registerCallback(&Animation::stopAnimation);
bool visible = (objID == kDragonObject || obj->_visible);
bool visible = (obj->_location == _vm->_game->getRoomNum() && obj->_visible);
if (visible && (obj->_location == _vm->_game->getRoomNum())) {
if (objID == kDragonObject || visible) {
_vm->_anims->play(animID);
}
}
@ -382,19 +382,19 @@ void Script::startPlay(Common::Queue<int> &params) {
anim->registerCallback(&Animation::exitGameLoop);
_vm->_game->setLoopStatus(kStatusStrange);
bool visible = (obj->_location == _vm->_game->getRoomNum() && obj->_visible);
if (objID == kDragonObject || visible) {
_vm->_anims->play(animID);
}
_vm->_game->loop();
_vm->_game->setExitLoop(false);
_vm->_anims->stop(animID);
_vm->_game->setLoopStatus(kStatusOrdinary);
anim->registerCallback(&Animation::doNothing);
bool visible = (objID == kDragonObject || obj->_visible);
if (visible && (obj->_location == _vm->_game->getRoomNum())) {
_vm->_anims->play(animID);
}
}
void Script::c_If(Common::Queue<int> &params) {