summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monstuff.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-11-28 16:22:09 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-11-28 16:22:09 +0000
commit990a102363ff38bf95ed78baf777f2a7ba57e62c (patch)
treeb839161145ae80ab232f6bd6e5c39dd0c2351a19 /crawl-ref/source/monstuff.cc
parent2367c6063d5007494524711946e83a832b562076 (diff)
downloadcrawl-ref-990a102363ff38bf95ed78baf777f2a7ba57e62c.tar.gz
crawl-ref-990a102363ff38bf95ed78baf777f2a7ba57e62c.zip
[1834349] Fixed reaching going through walls.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2924 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monstuff.cc')
-rw-r--r--crawl-ref/source/monstuff.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index 928f05e50a..87f3b4c336 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -2965,7 +2965,8 @@ static bool handle_reaching(monsters *monster)
if (monster->foe == MHITYOU)
{
// this check isn't redundant -- player may be invisible.
- if (monster->target_x == you.x_pos && monster->target_y == you.y_pos)
+ if (monster->target_pos() == you.pos()
+ && see_grid_no_trans(monster->pos()))
{
int dx = abs(monster->x - you.x_pos);
int dy = abs(monster->y - you.y_pos);