diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-06-03 14:30:44 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-06-03 14:30:44 +0000 |
commit | b53b7421dc0bda8dc3a4713cad64a6275132261c (patch) | |
tree | 73cfe4c305e6f0bb285cd900443fb842c21e9414 | |
parent | 14422af9774ec97d44f8a6b703d18a1b93942a38 (diff) | |
download | crawl-ref-b53b7421dc0bda8dc3a4713cad64a6275132261c.tar.gz crawl-ref-b53b7421dc0bda8dc3a4713cad64a6275132261c.zip |
Refix charm check so interrupt is not fired for monsters not in view.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1523 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r-- | crawl-ref/source/mon-util.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc index 42fb7bfaf9..4e463c0769 100644 --- a/crawl-ref/source/mon-util.cc +++ b/crawl-ref/source/mon-util.cc @@ -3023,9 +3023,12 @@ void monsters::remove_enchantment_effect(const mon_enchant &me, bool quiet) if (!quiet) simple_monster_message(this, " is no longer charmed."); - // and fire activity interrupts - interrupt_activity(AI_SEE_MONSTER, - activity_interrupt_data(this, "uncharm")); + if (mons_near(this) && player_monster_visible(this)) + { + // and fire activity interrupts + interrupt_activity(AI_SEE_MONSTER, + activity_interrupt_data(this, "uncharm")); + } // reevaluate behaviour behaviour_event(this, ME_EVAL); |