diff options
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r-- | crawl-ref/source/player.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 3892682d80..452c16a57c 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -7362,16 +7362,17 @@ bool player::visible_to(const actor *looker) const return mons_player_visible(mon); } +bool player::see_cell(const coord_def &c) const +{ + return (::see_cell(c)); +} + bool player::can_see(const actor *target) const { if (crawl_state.arena) return target->visible_to(this); - if (this == target) - return visible_to(target); - - const monsters* mon = dynamic_cast<const monsters*>(target); - return (mons_near(mon) && target->visible_to(this)); + return (target->visible_to(this) && see_cell(target->pos())); } bool player::backlit(bool check_haloed) const |