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

dreammaster at users.sourceforge.net dreammaster at users.sourceforge.net
Sat Nov 17 11:49:14 CET 2007


Revision: 29536
          http://scummvm.svn.sourceforge.net/scummvm/?rev=29536&view=rev
Author:   dreammaster
Date:     2007-11-17 02:49:14 -0800 (Sat, 17 Nov 2007)

Log Message:
-----------
Added missing code to deactivate animations that have finished

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

Modified: scummvm/trunk/engines/lure/hotspots.cpp
===================================================================
--- scummvm/trunk/engines/lure/hotspots.cpp	2007-11-17 10:47:37 UTC (rev 29535)
+++ scummvm/trunk/engines/lure/hotspots.cpp	2007-11-17 10:49:14 UTC (rev 29536)
@@ -2321,10 +2321,18 @@
 }
 
 void HotspotTickHandlers::standardAnimHandler(Hotspot &h) {
+	Resources &res = Resources::getReference();
+
 	if (h.frameCtr() > 0) 
 		h.decrFrameCtr();
-	else 
-		h.executeScript();
+	else {
+		if (h.executeScript()) {
+			// Script is finished - deactivate hotspot and move it to an out of range room
+			HotspotData *data = h.resource();
+			res.deactivateHotspot(&h);
+			data->roomNumber |= 0x8000;
+		}
+	}
 }
 
 void HotspotTickHandlers::standardAnimHandler2(Hotspot &h) {


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