diff options
author | Paul Gilbert | 2008-01-09 11:14:15 +0000 |
---|---|---|
committer | Paul Gilbert | 2008-01-09 11:14:15 +0000 |
commit | af443ba924a4575cb799e932aa02f197332ede0a (patch) | |
tree | 4f0de9e20f640862c1c54e05a3b37536b9f88ed8 /engines | |
parent | 85b3a4a59e1ddc6da55bdcf8212e6bfac391af6d (diff) | |
download | scummvm-rg350-af443ba924a4575cb799e932aa02f197332ede0a.tar.gz scummvm-rg350-af443ba924a4575cb799e932aa02f197332ede0a.tar.bz2 scummvm-rg350-af443ba924a4575cb799e932aa02f197332ede0a.zip |
Bugfix for #1866782 - fixes the issue with the Blacksmith being reactivated after earlier being deactivated in the middle of hammering the anvil
svn-id: r30353
Diffstat (limited to 'engines')
-rw-r--r-- | engines/lure/debugger.h | 2 | ||||
-rw-r--r-- | engines/lure/hotspots.cpp | 22 |
2 files changed, 20 insertions, 4 deletions
diff --git a/engines/lure/debugger.h b/engines/lure/debugger.h index 3936f9fb10..f447593fee 100644 --- a/engines/lure/debugger.h +++ b/engines/lure/debugger.h @@ -50,6 +50,8 @@ protected: bool cmd_debug(int argc, const char **argv); }; +extern const char *directionList[5]; + } // End of namespace Lure #endif diff --git a/engines/lure/hotspots.cpp b/engines/lure/hotspots.cpp index 2d39b363f6..8fe8e74c76 100644 --- a/engines/lure/hotspots.cpp +++ b/engines/lure/hotspots.cpp @@ -204,6 +204,15 @@ Hotspot::Hotspot(): _pathFinder(NULL) { } Hotspot::~Hotspot() { + // WORKAROUND: If Blacksmith is being deactivated, make sure his animation is + // reset back to his standard movement set + if (_hotspotId == BLACKSMITH_ID) { + Resources &res = Resources::getReference(); + HotspotAnimData *tempAnim = res.animRecords()[BLACKSMITH_DEFAULT_ANIM_INDEX]; + assert(tempAnim); + _data->animRecordId = tempAnim->animRecordId; + } + if (_frames) delete _frames; } @@ -695,11 +704,16 @@ bool Hotspot::walkingStep() { int16 _xChange, _yChange; uint16 nextFrame; - frameSet->getFrame(frameNumber(), _xChange, _yChange, nextFrame); - setFrameNumber(nextFrame); - setPosition(x() + _xChange, y() + _yChange); + if (frameSet->getFrame(frameNumber(), _xChange, _yChange, nextFrame)) { + setFrameNumber(nextFrame); + setPosition(x() + _xChange, y() + _yChange); + + ++_pathFinder.stepCtr(); + } else { + warning("Hotspot %xh dir frame not found: currentFrame=%d, dir=%s", + _hotspotId, frameNumber(), directionList[(int) _pathFinder.top().direction()]); + } - ++_pathFinder.stepCtr(); return false; } |