summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/mon-util.cc3
-rw-r--r--crawl-ref/source/monstuff.cc4
2 files changed, 7 insertions, 0 deletions
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index 04c0fba02d..f1e51e9e71 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -2717,6 +2717,9 @@ void mons_pacify(monsters *mon)
mon->flags |= MF_GOT_HALF_XP;
}
+ // Cancel fleeing and such.
+ mon->behaviour = BEH_WANDER;
+
// Make the monster begin leaving the level.
behaviour_event(mon, ME_EVAL);
}
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!");