summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monstuff.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-30 16:08:31 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-30 16:08:31 +0000
commit85f8a4e5ed285a0a1038315d230d56f42b263ddf (patch)
tree78b94456aa89ba3272c89dd704ae192cbb7c32ae /crawl-ref/source/monstuff.cc
parent8d4a4ac462d704c8cb86927f19d62972c61bb055 (diff)
downloadcrawl-ref-85f8a4e5ed285a0a1038315d230d56f42b263ddf.tar.gz
crawl-ref-85f8a4e5ed285a0a1038315d230d56f42b263ddf.zip
Pacified monsters change their behaviour to BEH_WANDER, in case
they were fleeing, etc. when you pacified them. I'm not completely sure this is correct as I'm not too knowledgeable about pacified monsters. Review welcome. Fixes [2540905]. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8857 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monstuff.cc')
-rw-r--r--crawl-ref/source/monstuff.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index 22c33f43d1..09f0b726e3 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -2632,6 +2632,10 @@ void behaviour_event(monsters *mon, int event, int src,
if (!mons_wont_attack(mon) && is_sanctuary(mon->pos()))
break;
+ // Pacified monsters shouldn't change their behaviour.
+ if (mons_is_pacified(mon))
+ break;
+
// Just set behaviour... foe doesn't change.
if (!mons_is_cornered(mon))
simple_monster_message(mon, " turns to fight!");