[Scummvm-git-logs] scummvm master -> 7e5842fd43885ea98a429cf2c1186b6caa5ab645

dreammaster dreammaster at scummvm.org
Mon Oct 24 03:35:28 CEST 2016


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
7e5842fd43 TITANIC: Fix showing multiple NPC animations as Doorbot speaks


Commit: 7e5842fd43885ea98a429cf2c1186b6caa5ab645
    https://github.com/scummvm/scummvm/commit/7e5842fd43885ea98a429cf2c1186b6caa5ab645
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2016-10-23T21:35:22-04:00

Commit Message:
TITANIC: Fix showing multiple NPC animations as Doorbot speaks

Changed paths:
    engines/titanic/npcs/true_talk_npc.cpp



diff --git a/engines/titanic/npcs/true_talk_npc.cpp b/engines/titanic/npcs/true_talk_npc.cpp
index 9a8cd16..55666a2 100644
--- a/engines/titanic/npcs/true_talk_npc.cpp
+++ b/engines/titanic/npcs/true_talk_npc.cpp
@@ -99,8 +99,10 @@ bool CTrueTalkNPC::TrueTalkNotifySpeechStartedMsg(CTrueTalkNotifySpeechStartedMs
 	++_field100;
 
 	if (!(_npcFlags & NPCFLAG_8)) {
+		// Stop any previous animation
 		if (_speechTimerId)
-			stopTimer(_speechTimerId);
+			stopAnimTimer(_speechTimerId);
+		_speechTimerId = 0;
 
 		_speechDuration = msg->_speechDuration;
 		_startTicks = getTicksCount();
@@ -200,7 +202,7 @@ bool CTrueTalkNPC::NPCPlayAnimationMsg(CNPCPlayAnimationMsg *msg) {
 			index = getRandomNumber(count - 1);
 		} while (getClipDuration(msg->_names[index]) > msg->_maxDuration && --tries);
 
-		if (tries) {
+		if (!tries) {
 			// Sequentially go through the clips to find any below the maximum
 			index = 0;
 			for (int idx = 0; idx < count; ++idx) {
@@ -211,9 +213,9 @@ bool CTrueTalkNPC::NPCPlayAnimationMsg(CNPCPlayAnimationMsg *msg) {
 			}
 		}
 
-		playClip(msg->_names[index], MOVIE_GAMESTATE | MOVIE_NOTIFY_OBJECT);
+		playClip(msg->_names[index], MOVIE_NOTIFY_OBJECT);
 	} else {
-		playClip(msg->_names[getRandomNumber(count - 1)]);
+		playClip(msg->_names[getRandomNumber(count - 1)], MOVIE_NOTIFY_OBJECT);
 	}
 
 	return true;





More information about the Scummvm-git-logs mailing list