summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2006-12-30 11:55:49 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2006-12-30 11:55:49 +0000
commitb3f493e9cb1b26dd74edad3ea6006863248e9e93 (patch)
tree9a8cb3e882bd4a11bd90d2a0aa3baa0d91c86e88
parentb031865ee90acfb47e739d01a1626a6e82d8f601 (diff)
downloadcrawl-ref-b3f493e9cb1b26dd74edad3ea6006863248e9e93.tar.gz
crawl-ref-b3f493e9cb1b26dd74edad3ea6006863248e9e93.zip
Fix for the refusal-to-follow bug: monsters refused to visit disarmed trap squares.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@740 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/misc.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index ec70ec1cc4..f0b034a3a1 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -1758,8 +1758,9 @@ int trap_at_xy(int which_x, int which_y)
for (int which_trap = 0; which_trap < MAX_TRAPS; which_trap++)
{
- if (env.trap[which_trap].x == which_x
- && env.trap[which_trap].y == which_y)
+ if (env.trap[which_trap].x == which_x &&
+ env.trap[which_trap].y == which_y &&
+ env.trap[which_trap].type != TRAP_UNASSIGNED)
{
return (which_trap);
}