[Scummvm-cvs-logs] SF.net SVN: scummvm: [29507] scummvm/trunk/engines/lure/hotspots.cpp
dreammaster at users.sourceforge.net
dreammaster at users.sourceforge.net
Thu Nov 15 11:07:46 CET 2007
Revision: 29507
http://scummvm.svn.sourceforge.net/scummvm/?rev=29507&view=rev
Author: dreammaster
Date: 2007-11-15 02:07:46 -0800 (Thu, 15 Nov 2007)
Log Message:
-----------
Bugfix to prevent characters occasionally facing one way whilst walking in another direction
Modified Paths:
--------------
scummvm/trunk/engines/lure/hotspots.cpp
Modified: scummvm/trunk/engines/lure/hotspots.cpp
===================================================================
--- scummvm/trunk/engines/lure/hotspots.cpp 2007-11-14 23:19:09 UTC (rev 29506)
+++ scummvm/trunk/engines/lure/hotspots.cpp 2007-11-15 10:07:46 UTC (rev 29507)
@@ -820,6 +820,23 @@
debugC(ERROR_DETAILED, kLureDebugAnimations, "Talk countdown = %d", _data->talkCountdown);
if (_data->talkCountdown == CONVERSE_COUNTDOWN_SIZE) {
+ // Check if there's already an active dialog - if so, wait until it's finished
+ if (room.isDialogActive() && (res.getTalkingCharacter() != _hotspotId)) {
+ ++_data->talkCountdown;
+ if (delayCtr() > 0)
+ setDelayCtr(delayCtr() + 2);
+
+ if ((_data->talkDestCharacterId != 0) && (_data->talkDestCharacterId != NOONE_ID)) {
+ Hotspot *destCharacter = res.getActiveHotspot(_data->talkDestCharacterId);
+ if (destCharacter->resource()->talkCountdown > CONVERSE_COUNTDOWN_SIZE) {
+ destCharacter->resource()->talkCountdown += 2;
+ if (destCharacter->delayCtr() > 0)
+ destCharacter->setDelayCtr(destCharacter->delayCtr() + 2);
+ }
+ }
+ return;
+ }
+
// Time to set up the dialog for the character
--_data->talkCountdown;
debugC(ERROR_DETAILED, kLureDebugAnimations, "Talk dialog opening");
@@ -891,15 +908,6 @@
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);
}
@@ -3420,6 +3428,8 @@
case TALK_RESPONSE_WAIT:
// Wait until the character's response has finished being displayed
+ h.handleTalkDialog();
+
charHotspot = res.getActiveHotspot(talkDestCharacter);
assert(charHotspot);
debugC(ERROR_DETAILED, kLureDebugAnimations, "Player talk dialog countdown %d",
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