[Scummvm-cvs-logs] SF.net SVN: scummvm:[48533] scummvm/trunk/engines/lure

dreammaster at users.sourceforge.net dreammaster at users.sourceforge.net
Mon Apr 5 08:07:14 CEST 2010


Revision: 48533
          http://scummvm.svn.sourceforge.net/scummvm/?rev=48533&view=rev
Author:   dreammaster
Date:     2010-04-05 06:07:14 +0000 (Mon, 05 Apr 2010)

Log Message:
-----------
Bugfix for correctly getting a follower to return to player when blocked from exiting a room 5 times

Modified Paths:
--------------
    scummvm/trunk/engines/lure/hotspots.cpp
    scummvm/trunk/engines/lure/res_struct.h

Modified: scummvm/trunk/engines/lure/hotspots.cpp
===================================================================
--- scummvm/trunk/engines/lure/hotspots.cpp	2010-04-05 01:49:00 UTC (rev 48532)
+++ scummvm/trunk/engines/lure/hotspots.cpp	2010-04-05 06:07:14 UTC (rev 48533)
@@ -4022,8 +4022,10 @@
 		if (h.currentActions().size() > 1) {
 			// Pending items on stack
 			if (h.startRoomNumber() != 0) {
-				if (h.currentActions().top().supportData().id() != RETURN_SUPPORT_ID) {
-					h.currentActions().top().supportData().setDetails(RETURN, 0);
+				if (!h.currentActions().bottom().hasSupportData() || (h.currentActions().bottom().action() != RETURN)) {
+					// Signal character to return
+					h.currentActions().clear();
+					h.currentActions().addFront(RETURN, h.startRoomNumber(), 0, 0);
 				}
 			}
 			h.currentActions().top().setRoomNumber(h.roomNumber());

Modified: scummvm/trunk/engines/lure/res_struct.h
===================================================================
--- scummvm/trunk/engines/lure/res_struct.h	2010-04-05 01:49:00 UTC (rev 48532)
+++ scummvm/trunk/engines/lure/res_struct.h	2010-04-05 06:07:14 UTC (rev 48533)
@@ -467,6 +467,11 @@
 	bool isEmpty() { return _actions.begin() == _actions.end(); }
 	void clear() { _actions.clear(); }
 	CurrentActionEntry &top() { return **_actions.begin(); }
+	CurrentActionEntry &bottom() { 
+		ActionsList::iterator i = _actions.end();
+		--i;
+		return **i;
+	}
 	CurrentAction action() { return isEmpty() ? NO_ACTION : top().action(); }
 	void pop() { _actions.erase(_actions.begin()); }
 	int size() { return _actions.size(); }


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