[Scummvm-cvs-logs] SF.net SVN: scummvm:[48709] scummvm/trunk/engines/lure/hotspots.cpp
dreammaster at users.sourceforge.net
dreammaster at users.sourceforge.net
Mon Apr 19 11:40:21 CEST 2010
Revision: 48709
http://scummvm.svn.sourceforge.net/scummvm/?rev=48709&view=rev
Author: dreammaster
Date: 2010-04-19 09:40:20 +0000 (Mon, 19 Apr 2010)
Log Message:
-----------
Bugfix for correctly returning follower to player when they're blocked from acting
Modified Paths:
--------------
scummvm/trunk/engines/lure/hotspots.cpp
Modified: scummvm/trunk/engines/lure/hotspots.cpp
===================================================================
--- scummvm/trunk/engines/lure/hotspots.cpp 2010-04-19 06:57:39 UTC (rev 48708)
+++ scummvm/trunk/engines/lure/hotspots.cpp 2010-04-19 09:40:20 UTC (rev 48709)
@@ -4028,23 +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().bottom().hasSupportData() ||
+ // If character isn't already returning to starting room, start them doing so
+ if (!h.currentActions().bottom().hasSupportData() ||
(h.currentActions().bottom().supportData().action() != RETURN)) {
- // Signal character to 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