diff options
Diffstat (limited to 'crawl-ref/source/actor.cc')
-rw-r--r-- | crawl-ref/source/actor.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crawl-ref/source/actor.cc b/crawl-ref/source/actor.cc index 83dcc799aa..b00125f5b7 100644 --- a/crawl-ref/source/actor.cc +++ b/crawl-ref/source/actor.cc @@ -17,6 +17,11 @@ bool actor::observable() const return (crawl_state.arena || this == &you || you.can_see(this)); } +bool actor::can_see(const actor *target) const +{ + return (target->visible_to(this) && see_cell(target->pos())); +} + bool actor::has_equipped(equipment_type eq, int sub_type) const { const item_def *item = slot_item(eq); |