diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-05-27 15:22:09 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-05-27 15:22:09 +0000 |
commit | 70ce5c5c0ce725bdb808bc5d5e7b216a7707e911 (patch) | |
tree | baa3b8b30850dc1133af3c0d50772cb618fd98d3 /crawl-ref/source/monstuff.cc | |
parent | 48897bf56eb09968aa14e171ac323d40719428d3 (diff) | |
download | crawl-ref-70ce5c5c0ce725bdb808bc5d5e7b216a7707e911.tar.gz crawl-ref-70ce5c5c0ce725bdb808bc5d5e7b216a7707e911.zip |
Add yet another new channel MSGCH_FRIEND_ACTION that
simple_monster_message uses instead of MSGCH_PLAIN if the monster in question
is friendly, and such messages (e.g. "Your imp blinks", but also all
other similar messages) won't interrupt resting nor running.
Also clean up travel.cc a bit, esp. the traversable_grid check that now
simply uses a for loop rather than list all traversable grids.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5297 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monstuff.cc')
-rw-r--r-- | crawl-ref/source/monstuff.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index fc3cd93f58..74cf8b2fdf 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -2777,6 +2777,9 @@ bool simple_monster_message(const monsters *monster, const char *event, snprintf( buff, sizeof(buff), "%s%s", monster->name(descrip).c_str(), event ); + if (channel == MSGCH_PLAIN && mons_wont_attack(monster)) + channel = MSGCH_FRIEND_ACTION; + mpr( buff, channel, param ); return (true); } |