summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/player.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-14 22:41:26 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-14 22:41:26 +0000
commit314d93a98176f4eea464be2349039a4fd57de764 (patch)
tree9bd62049a41086a4198c58daaa428462ea0d88e2 /crawl-ref/source/player.cc
parent26f8d2de7b69e5cc901b293f76dd0ded073ad1b7 (diff)
downloadcrawl-ref-314d93a98176f4eea464be2349039a4fd57de764.tar.gz
crawl-ref-314d93a98176f4eea464be2349039a4fd57de764.zip
Fix closing/opening doors not prompting if there are several adjacent
doors. Also, confusion is now handled more consistently. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10215 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r--crawl-ref/source/player.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index 1d13865abd..a3af5c9ebb 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -435,8 +435,9 @@ bool player_in_bat_form()
bool player_can_open_doors()
{
- // Bats can't close/open doors.
- return !player_in_bat_form();
+ // Bats and pigs can't open/close doors.
+ return (you.attribute[ATTR_TRANSFORMATION] != TRAN_BAT
+ && you.attribute[ATTR_TRANSFORMATION] != TRAN_PIG);
}
bool player_under_penance(void)