[Scummvm-cvs-logs] CVS: scummvm/scumm imuse.cpp,2.133,2.134

Torbjörn Andersson eriktorbjorn at users.sourceforge.net
Wed May 25 23:40:03 CEST 2005


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3716

Modified Files:
	imuse.cpp 
Log Message:
Fixed a glitch that could cause the music to stop when Sam & Max were
thrown out of Bumpusville.


Index: imuse.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/imuse.cpp,v
retrieving revision 2.133
retrieving revision 2.134
diff -u -d -r2.133 -r2.134
--- imuse.cpp	25 May 2005 19:39:09 -0000	2.133
+++ imuse.cpp	26 May 2005 06:38:52 -0000	2.134
@@ -211,16 +211,21 @@
 	Player *player;
 	void *ptr;
 
-	// Do not start a sound if it is already set to
-	// start on an ImTrigger event. This fixes carnival
-	// music problems where a sound has been set to trigger
-	// at the right time, but then is started up immediately
-	// anyway, only to be restarted later when the trigger
-	// occurs.
+	// Do not start a sound if it is already set to start on an ImTrigger
+	// event. This fixes carnival music problems where a sound has been set
+	// to trigger at the right time, but then is started up immediately
+	// anyway, only to be restarted later when the trigger occurs.
+	//
+	// However, we have to make sure the sound with the trigger is actually
+	// playing, otherwise the music may stop when Sam and Max are thrown
+	// out of Bumpusville, because entering the mansion sets up a trigger
+	// for a sound that isn't necessarily playing. This is somewhat related
+	// to bug #780918.
+
 	int i;
 	ImTrigger *trigger = _snm_triggers;
 	for (i = ARRAYSIZE(_snm_triggers); i; --i, ++trigger) {
-		if (trigger->sound && trigger->id && trigger->command[0] == 8 && trigger->command[1] == sound)
+		if (trigger->sound && trigger->id && trigger->command[0] == 8 && trigger->command[1] == sound && getSoundStatus(trigger->sound))
 			return false;
 	}
 





More information about the Scummvm-git-logs mailing list