summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/it_use3.cc5
-rw-r--r--crawl-ref/source/monstuff.cc3
2 files changed, 7 insertions, 1 deletions
diff --git a/crawl-ref/source/it_use3.cc b/crawl-ref/source/it_use3.cc
index 7b1f4fba04..161782ce0e 100644
--- a/crawl-ref/source/it_use3.cc
+++ b/crawl-ref/source/it_use3.cc
@@ -275,6 +275,11 @@ static bool reaching_weapon_attack(const item_def& wpn)
mpr("Your weapon cannot reach that far!");
return false;
}
+ else if (!see_grid_no_trans(beam.tx, beam.ty))
+ {
+ mpr("There's a wall in the way.");
+ return (false);
+ }
else if (mgrd[beam.tx][beam.ty] == NON_MONSTER)
{
// Must return true, otherwise you get a free discovery
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);