mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-23 20:51:14 +00:00
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
This commit is contained in:
parent
864ed910fa
commit
a48d2d3ff3
@ -649,6 +649,20 @@ bool Room::checkInTalkDialog() {
|
|||||||
// Don't allow dialog close if it's still in progress
|
// Don't allow dialog close if it's still in progress
|
||||||
if (_talkDialog->isBuilding()) return false;
|
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
|
// Check boundaries
|
||||||
Mouse &mouse = Mouse::getReference();
|
Mouse &mouse = Mouse::getReference();
|
||||||
return ((mouse.x() >= _talkDialogX) && (mouse.y() >= _talkDialogY) &&
|
return ((mouse.x() >= _talkDialogX) && (mouse.y() >= _talkDialogY) &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user