summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monstuff.cc
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-11-05 20:50:54 +0100
committerRobert Vollmert <rvollmert@gmx.net>2009-11-05 22:30:03 +0100
commitdc3f573c6ef467ddcc4a837ce90ca9df3b502c2e (patch)
treef7915736d0a9bad11d83c3ff8a0263577a27e979 /crawl-ref/source/monstuff.cc
parent31124ec682c2b826f169c23e808fa741a3033a04 (diff)
downloadcrawl-ref-dc3f573c6ef467ddcc4a837ce90ca9df3b502c2e.tar.gz
crawl-ref-dc3f573c6ef467ddcc4a837ce90ca9df3b502c2e.zip
Unify mesmerisation code.
There were several places that had copies of the same code, checking whether mesmerisation blocked movement to a given target. The various mesmerisation functions have become methods of player and were moved into behold.cc.
Diffstat (limited to 'crawl-ref/source/monstuff.cc')
-rw-r--r--crawl-ref/source/monstuff.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index 1f9cb7b05d..6c65a4a923 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -1323,8 +1323,7 @@ int monster_die(monsters *monster, killer_type killer,
mons_clear_trapping_net(monster);
- // Update list of monsters beholding player.
- update_beholders(monster, true);
+ you.remove_beholder(monster);
// Clear auto exclusion now the monster is killed -- if we know about it.
if (mons_near(monster) || wizard)
@@ -2257,7 +2256,7 @@ bool monster_polymorph(monsters *monster, monster_type targetc,
// the polymorph disrupts the beholding process. Do this before
// changing monster->type, since unbeholding can only happen while
// the monster is still a mermaid/siren.
- update_beholders(monster, true);
+ you.remove_beholder(monster);
// Inform listeners that the original monster is gone.
_fire_monster_death_event(monster, KILL_MISC, NON_MONSTER, true);