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

dreammaster at users.sourceforge.net dreammaster at users.sourceforge.net
Sun Dec 16 04:47:24 CET 2007


Revision: 29869
          http://scummvm.svn.sourceforge.net/scummvm/?rev=29869&view=rev
Author:   dreammaster
Date:     2007-12-15 19:47:24 -0800 (Sat, 15 Dec 2007)

Log Message:
-----------
Bugfix for followers doing an Ask action in another room

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

Modified: scummvm/trunk/engines/lure/hotspots.cpp
===================================================================
--- scummvm/trunk/engines/lure/hotspots.cpp	2007-12-16 01:29:39 UTC (rev 29868)
+++ scummvm/trunk/engines/lure/hotspots.cpp	2007-12-16 03:47:24 UTC (rev 29869)
@@ -1688,7 +1688,6 @@
 	Resources &res = Resources::getReference();
 	uint16 usedId = _currentActions.top().supportData().param(1);
 	Hotspot *destCharacter = res.getActiveHotspot(hotspot->hotspotId);
-	assert(destCharacter);
 	HotspotData *usedHotspot = res.getHotspot(usedId);
 	_data->useHotspotId = usedId;
 
@@ -1707,15 +1706,17 @@
 	uint16 sequenceOffset = res.getHotspotAction(hotspot->actionsOffset, ASK);
 
 	if (sequenceOffset >= 0x8000) {
-		destCharacter->showMessage(sequenceOffset, hotspotId());
+		if (destCharacter != NULL)
+			destCharacter->showMessage(sequenceOffset, hotspotId());
 	} else if (sequenceOffset != 0) {
 		sequenceOffset = Script::execute(sequenceOffset);
 
 		if (sequenceOffset == 0) {
 			// Give item to character
 			usedHotspot->roomNumber = hotspotId();
-			destCharacter->showMessage(32, hotspotId());
-		} else if (sequenceOffset != 1) {
+			if (destCharacter != NULL)
+				destCharacter->showMessage(32, hotspotId());
+		} else if ((sequenceOffset != 1) && (destCharacter != NULL)) {
 			destCharacter->showMessage(sequenceOffset, hotspotId());
 		}
 	}


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