[Scummvm-cvs-logs] SF.net SVN: scummvm: [30352] scummvm/branches/branch-0-11-0/engines/lure
dreammaster at users.sourceforge.net
dreammaster at users.sourceforge.net
Wed Jan 9 12:13:16 CET 2008
Revision: 30352
http://scummvm.svn.sourceforge.net/scummvm/?rev=30352&view=rev
Author: dreammaster
Date: 2008-01-09 03:13:15 -0800 (Wed, 09 Jan 2008)
Log Message:
-----------
Bugfix for #1866782 - fixes the issue with the Blacksmith being reactivated after earlier being deactivated in the middle of hammering the anvil
Modified Paths:
--------------
scummvm/branches/branch-0-11-0/engines/lure/debugger.h
scummvm/branches/branch-0-11-0/engines/lure/hotspots.cpp
Modified: scummvm/branches/branch-0-11-0/engines/lure/debugger.h
===================================================================
--- scummvm/branches/branch-0-11-0/engines/lure/debugger.h 2008-01-09 10:31:52 UTC (rev 30351)
+++ scummvm/branches/branch-0-11-0/engines/lure/debugger.h 2008-01-09 11:13:15 UTC (rev 30352)
@@ -50,6 +50,8 @@
bool cmd_debug(int argc, const char **argv);
};
+extern const char *directionList[5];
+
} // End of namespace Lure
#endif
Modified: scummvm/branches/branch-0-11-0/engines/lure/hotspots.cpp
===================================================================
--- scummvm/branches/branch-0-11-0/engines/lure/hotspots.cpp 2008-01-09 10:31:52 UTC (rev 30351)
+++ scummvm/branches/branch-0-11-0/engines/lure/hotspots.cpp 2008-01-09 11:13:15 UTC (rev 30352)
@@ -203,6 +203,15 @@
}
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;
}
@@ -694,11 +703,17 @@
int16 _xChange, _yChange;
uint16 nextFrame;
- frameSet->getFrame(frameNumber(), _xChange, _yChange, nextFrame);
- setFrameNumber(nextFrame);
- setPosition(x() + _xChange, y() + _yChange);
- ++_pathFinder.stepCtr();
+ 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()]);
+ }
+
return false;
}
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