aboutsummaryrefslogtreecommitdiff
path: root/engines/lure
diff options
context:
space:
mode:
authorPaul Gilbert2007-10-25 10:40:26 +0000
committerPaul Gilbert2007-10-25 10:40:26 +0000
commita48d2d3ff348681806d935af1c7859f9c71df802 (patch)
treed614863bb1836ef9bcf45787ec276574bf3716dc /engines/lure
parent864ed910fa3cf56abb3ec3907d4bac226cc03490 (diff)
downloadscummvm-rg350-a48d2d3ff348681806d935af1c7859f9c71df802.tar.gz
scummvm-rg350-a48d2d3ff348681806d935af1c7859f9c71df802.tar.bz2
scummvm-rg350-a48d2d3ff348681806d935af1c7859f9c71df802.zip
Talk dialogs can now only be closed early if it's the player talking, or an NPC is talking directly to the player
svn-id: r29258
Diffstat (limited to 'engines/lure')
-rw-r--r--engines/lure/room.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/engines/lure/room.cpp b/engines/lure/room.cpp
index 0dbca44d83..41ec7569e2 100644
--- a/engines/lure/room.cpp
+++ b/engines/lure/room.cpp
@@ -649,6 +649,20 @@ bool Room::checkInTalkDialog() {
// Don't allow dialog close if it's still in progress
if (_talkDialog->isBuilding()) return false;
+ // Only allow the dialog to be closable if it's the player talking, or
+ // someone talking to the player
+ Resources &res = Resources::getReference();
+ uint16 talkerId = res.getTalkingCharacter();
+ if ((talkerId == NOONE_ID) || (talkerId == 0))
+ return false;
+
+ if (talkerId != PLAYER_ID) {
+ HotspotData *charHotspot = res.getHotspot(talkerId);
+ assert(charHotspot);
+ if (charHotspot->talkDestCharacterId != PLAYER_ID)
+ return false;
+ }
+
// Check boundaries
Mouse &mouse = Mouse::getReference();
return ((mouse.x() >= _talkDialogX) && (mouse.y() >= _talkDialogY) &&