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/view.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/view.cc')
-rw-r--r-- | crawl-ref/source/view.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc index a13194baa1..0e836ba0d9 100644 --- a/crawl-ref/source/view.cc +++ b/crawl-ref/source/view.cc @@ -1197,8 +1197,11 @@ void handle_monster_shouts(monsters* monster, bool force) } } - msg = do_mon_str_replacements(msg, monster, s_type); - msg::streams(channel) << msg << std::endl; + if (channel != MSGCH_TALK_VISUAL || you.can_see(monster)) + { + msg = do_mon_str_replacements(msg, monster, s_type); + msg::streams(channel) << msg << std::endl; + } } const int noise_level = get_shout_noise_level(s_type); |