diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-09-15 15:33:21 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-09-15 15:33:21 +0000 |
commit | 1a2eb5c482d9754544d267ff71bbec4c7411ab60 (patch) | |
tree | f2da0a7ee403c20482963f0ea670b8a0438c9138 /crawl-ref/source/message.cc | |
parent | 2072d2654f4f2dc65110a8b3f221ab731bea2f28 (diff) | |
download | crawl-ref-1a2eb5c482d9754544d267ff71bbec4c7411ab60.tar.gz crawl-ref-1a2eb5c482d9754544d267ff71bbec4c7411ab60.zip |
Fixed a bug that made silence last forever. This also meant
moving "Your hearing returns." where it belongs, thus
fixing 1773460.
I also moved a couple of messages (namely weapon noises, and
hell effects) into MSGCH_TALK and MSGCH_SOUND, both of which
now are ignored as travel stoppers. I didn't check all
instances of potential talk and noises, but if there are
cases where we want a message to always stop resting, we
could move the message in question to MSGCH_WARN or
MSGCH_MONSTER_SPELL. Conversely, there's probably lots of
stuff around that could also get ignored.
Users can still specify messages in stop_travel that will
interrupt both rest and travel. (There's currently no
distinction, and I made no changes on that account.)
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2089 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/message.cc')
-rw-r--r-- | crawl-ref/source/message.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/crawl-ref/source/message.cc b/crawl-ref/source/message.cc index 123533f1de..fef6efa68a 100644 --- a/crawl-ref/source/message.cc +++ b/crawl-ref/source/message.cc @@ -479,8 +479,12 @@ static void mpr_check_patterns(const std::string& message, } } - if (channel != MSGCH_DIAGNOSTICS && channel != MSGCH_EQUIPMENT) + // reusing travel_stop_message here + if (channel != MSGCH_DIAGNOSTICS && channel != MSGCH_EQUIPMENT + && channel != MSGCH_SOUND && channel != MSGCH_TALK) + { interrupt_activity( AI_MESSAGE, channel_to_str(channel) + ":" + message ); + } // Check messages for all forms of running now. if (you.running) @@ -588,6 +592,12 @@ static void base_mpr(const char *inf, msg_channel_type channel, int param) if ( colour == MSGCOL_MUTED ) return; + + if (silenced(you.x_pos, you.y_pos) && + (channel == MSGCH_SOUND || channel == MSGCH_TALK)) + { + return; + } if (need_prefix) { |