[Scummvm-cvs-logs] SF.net SVN: scummvm:[48710] scummvm/branches/branch-1-1-0/engines/lure/ hotspots.cpp
dreammaster at users.sourceforge.net
dreammaster at users.sourceforge.net
Mon Apr 19 11:43:16 CEST 2010
Revision: 48710
http://scummvm.svn.sourceforge.net/scummvm/?rev=48710&view=rev
Author: dreammaster
Date: 2010-04-19 09:43:16 +0000 (Mon, 19 Apr 2010)
Log Message:
-----------
Backport of r48709 - Bugfix for correctly handling blocked followers
Modified Paths:
--------------
scummvm/branches/branch-1-1-0/engines/lure/hotspots.cpp
Modified: scummvm/branches/branch-1-1-0/engines/lure/hotspots.cpp
===================================================================
--- scummvm/branches/branch-1-1-0/engines/lure/hotspots.cpp 2010-04-19 09:40:20 UTC (rev 48709)
+++ scummvm/branches/branch-1-1-0/engines/lure/hotspots.cpp 2010-04-19 09:43:16 UTC (rev 48710)
@@ -4028,20 +4028,22 @@
if (h.exitCtr() >= 5) {
// Failed to exit room too many times
h.setExitCtr(0);
- if (h.currentActions().size() > 1) {
- // Pending items on stack
+
+ if (!h.currentActions().isEmpty()) {
if (h.startRoomNumber() != 0) {
- if (h.currentActions().top().supportData().id() != RETURN_SUPPORT_ID) {
- h.currentActions().top().supportData().setDetails(RETURN, 0);
+ // If character isn't already returning to starting room, start them doing so
+ if (!h.currentActions().bottom().hasSupportData() ||
+ (h.currentActions().bottom().supportData().action() != RETURN)) {
+ // Start follower returning
+ h.currentActions().clear();
+ h.currentActions().addFront(RETURN, h.startRoomNumber(), 0, 0);
}
}
- h.currentActions().top().setRoomNumber(h.roomNumber());
} else if ((h.blockedOffset() != 0) && (h.blockedOffset() != 0xffff)) {
// Only current action on stack - and there is a block handler
CharacterScheduleEntry *entry = res.charSchedules().getEntry(h.blockedOffset());
- h.currentActions().top().setSupportData(entry);
- h.currentActions().top().setRoomNumber(h.roomNumber());
+ h.currentActions().addFront(DISPATCH_ACTION, entry, h.roomNumber());
}
return;
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