diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-02-25 15:37:08 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-02-25 15:37:08 +0000 |
commit | 12b89633e82cf30122e96aaa65e9eebefba6e719 (patch) | |
tree | ede539aa683b474cfc8389995da74f5d41e516f0 /crawl-ref/source/monspeak.cc | |
parent | 038933c5364d09f01b7a99026aea6bafcf4dcc71 (diff) | |
download | crawl-ref-12b89633e82cf30122e96aaa65e9eebefba6e719.tar.gz crawl-ref-12b89633e82cf30122e96aaa65e9eebefba6e719.zip |
Don't give shout/talk messages if they're on the TALK_VISUAL channel
(e.g., "The jelly quivers", "The jelly jiggles") and you can't see
the relevant monster.
Fixes half of [2628480].
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9215 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monspeak.cc')
-rw-r--r-- | crawl-ref/source/monspeak.cc | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/crawl-ref/source/monspeak.cc b/crawl-ref/source/monspeak.cc index 2e82194879..c956118664 100644 --- a/crawl-ref/source/monspeak.cc +++ b/crawl-ref/source/monspeak.cc @@ -749,7 +749,7 @@ void mons_speaks_msg(const monsters *monster, const std::string &msg, // This function is a little bit of a problem for the message // channels since some of the messages it generates are "fake" - // warning to scare the player. In order to accomidate this + // warning to scare the player. In order to accomodate this // intent, we're falsely categorizing various things in the // function as spells and danger warning... everything else // just goes into the talk channel -- bwr @@ -795,21 +795,14 @@ void mons_speaks_msg(const monsters *monster, const std::string &msg, // Except for VISUAL, none of the above influence these. if (line == "__YOU_RESIST" && (!silence || param == "VISUAL")) - { canned_msg( MSG_YOU_RESIST ); - continue; - } else if (line == "__NOTHING_HAPPENS" && (!silence || param == "VISUAL")) - { canned_msg( MSG_NOTHING_HAPPENS ); - continue; - } else if (line == "__MORE" && (!silence || param == "VISUAL")) - { more(); - continue; - } - - mpr(line.c_str(), msg_type); + else if (msg_type == MSGCH_TALK_VISUAL && !you.can_see(monster)) + ; // do nothing + else + mpr(line.c_str(), msg_type); } } |