summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monstuff.cc
diff options
context:
space:
mode:
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);