summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/acr.cc
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-02 10:07:52 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-02 10:07:52 +0000
commit494a1b9c815b29c5ec622f3f3c9d58f809b5f2ad (patch)
treec4d77a3e6e6b9c29865dbd2db3c302f8df61cebd /crawl-ref/source/acr.cc
parentbae5b88570c9da4e2529f0dd4e8cab25e7c5cef1 (diff)
downloadcrawl-ref-494a1b9c815b29c5ec622f3f3c9d58f809b5f2ad.tar.gz
crawl-ref-494a1b9c815b29c5ec622f3f3c9d58f809b5f2ad.zip
Don't let the player swap places with stationary monsters.
Let monsters inside sanctuary swap places if they're (probably) going in opposite directions. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6329 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/acr.cc')
-rw-r--r--crawl-ref/source/acr.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc
index 7bfe689d1c..02b2083931 100644
--- a/crawl-ref/source/acr.cc
+++ b/crawl-ref/source/acr.cc
@@ -4221,6 +4221,7 @@ static void _move_player(int move_x, int move_y)
// you can swap places with a friendly or good neutral monster if
// you're not confused, or if both of you are inside a sanctuary
const bool can_swap_places = targ_monst != NON_MONSTER
+ && !mons_is_stationary(&menv[targ_monst])
&& (mons_wont_attack(&menv[targ_monst])
&& !you.duration[DUR_CONF]
|| is_sanctuary(you.x_pos, you.y_pos)