summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/view.h
diff options
context:
space:
mode:
authorMatthew Cline <zelgadis@sourceforge.net>2009-10-21 13:21:20 -0700
committerMatthew Cline <zelgadis@sourceforge.net>2009-10-21 13:21:20 -0700
commitc7a7fb4439a5f5006109abcd20cd0300f7d36827 (patch)
tree9a92c9a28570abc6488d58a032048e5f8b12c137 /crawl-ref/source/view.h
parent1995a2a6436f8a2d3216634f24d5ed76d97327e2 (diff)
downloadcrawl-ref-c7a7fb4439a5f5006109abcd20cd0300f7d36827.tar.gz
crawl-ref-c7a7fb4439a5f5006109abcd20cd0300f7d36827.zip
Don't disturb monsters witth their own sound
A monster making noise was causing an ME_DISTURB behaviour_event() for itself, possibly causing it to get a new foe, which could cause strange results if it switched foes during the middle of spell-casting when it made noise from chanting. Now noisy() can accept a "who" parameter, in which case the monster which caused the noise will ignore the noise. This is done in all cases except for when a monster of animal or lower intelligence sets off an alarm trap or does a spell miscast.
Diffstat (limited to 'crawl-ref/source/view.h')
-rw-r--r--crawl-ref/source/view.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/crawl-ref/source/view.h b/crawl-ref/source/view.h
index bafb2f7117..44cd06863b 100644
--- a/crawl-ref/source/view.h
+++ b/crawl-ref/source/view.h
@@ -72,8 +72,10 @@ void find_features(const std::vector<coord_def>& features,
bool magic_mapping(int map_radius, int proportion, bool suppress_msg,
bool force = false);
-bool noisy(int loudness, const coord_def& where, const char *msg = NULL,
+bool noisy(int loudness, const coord_def& where, int who,
bool mermaid = false);
+bool noisy(int loudness, const coord_def& where, const char *msg = NULL,
+ int who = -1, bool mermaid = false);
void blood_smell( int strength, const coord_def& where);
void handle_monster_shouts(monsters* monster, bool force = false);