[Scummvm-cvs-logs] SF.net SVN: scummvm: [29492] scummvm/trunk/engines/lure/hotspots.cpp
dreammaster at users.sourceforge.net
dreammaster at users.sourceforge.net
Tue Nov 13 10:49:43 CET 2007
Revision: 29492
http://scummvm.svn.sourceforge.net/scummvm/?rev=29492&view=rev
Author: dreammaster
Date: 2007-11-13 01:49:43 -0800 (Tue, 13 Nov 2007)
Log Message:
-----------
Added guard to prevent one character's talk dialog interrupting another one that's already in-progress
Modified Paths:
--------------
scummvm/trunk/engines/lure/hotspots.cpp
Modified: scummvm/trunk/engines/lure/hotspots.cpp
===================================================================
--- scummvm/trunk/engines/lure/hotspots.cpp 2007-11-13 09:47:04 UTC (rev 29491)
+++ scummvm/trunk/engines/lure/hotspots.cpp 2007-11-13 09:49:43 UTC (rev 29492)
@@ -890,6 +890,16 @@
if (room.roomNumber() != roomNumber())
return;
+
+ if (room.isDialogActive()) {
+ // There's already an active dialog, so need to wait until it's finished
+ ++_data->talkCountdown;
+ if (delayCtr() > 0)
+ setDelayCtr(delayCtr() + 1);
+
+ return;
+ }
+
room.setTalkDialog(hotspotId(), _data->talkDestCharacterId, _data->useHotspotId,
_data->talkMessageId);
}
@@ -3225,6 +3235,7 @@
Resources &res = Resources::getReference();
StringData &strings = StringData::getReference();
Screen &screen = Screen::getReference();
+ Room &room = Room::getReference();
Mouse &mouse = Mouse::getReference();
TalkSelections &talkSelections = res.getTalkSelections();
TalkData *data = res.getTalkData();
@@ -3244,6 +3255,11 @@
case TALK_NONE:
talkDestCharacter = h.resource()->talkDestCharacterId;
assert(talkDestCharacter != 0);
+
+ // Make sure any other dialog is finished before we start talking
+ if (room.isDialogActive())
+ return;
+
// Fall through to TALK_START
case TALK_START:
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