summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-util.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-29 02:07:33 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-29 02:07:33 +0000
commitc4f5e14829647ea6d000b9cc9e5553579c0db929 (patch)
treec3396227044ed0c95a03bb5fb6e975bc25db6a03 /crawl-ref/source/mon-util.cc
parent937f36f4201f77026777adab83bf6759759b167d (diff)
downloadcrawl-ref-c4f5e14829647ea6d000b9cc9e5553579c0db929.tar.gz
crawl-ref-c4f5e14829647ea6d000b9cc9e5553579c0db929.zip
Faking falls through shaft traps for pacified monsters doesn't quite
work, as it doesn't use the proper target. Fix this by not marking pacified monsters for transit if they fall through shaft traps. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6194 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/mon-util.cc')
-rw-r--r--crawl-ref/source/mon-util.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index 8973f43299..a16cc59a97 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -6246,7 +6246,10 @@ bool monsters::do_shaft()
if (lev == level_id::current())
return (false);
- set_transit(lev);
+ // If a pacified monster is leaving the level via a shaft trap, and
+ // has reached its goal, handle it here.
+ if (!mons_is_pacified(this))
+ set_transit(lev);
const bool reveal =
simple_monster_message(this, " falls through a shaft!");