diff options
Diffstat (limited to 'crawl-ref/source/actor.cc')
-rw-r--r-- | crawl-ref/source/actor.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/crawl-ref/source/actor.cc b/crawl-ref/source/actor.cc index efc56962ef..705a492221 100644 --- a/crawl-ref/source/actor.cc +++ b/crawl-ref/source/actor.cc @@ -17,6 +17,16 @@ bool actor::observable() const return (crawl_state.arena || this == &you || you.can_see(this)); } +bool actor::see_cell(const coord_def &p) const +{ + return (los.see_cell(p)); +} + +void actor::update_los() +{ + los.update(); +} + bool actor::can_see(const actor *target) const { return (target->visible_to(this) && see_cell(target->pos())); @@ -118,4 +128,5 @@ bool actor::check_res_magic(int power) void actor::set_position(const coord_def &c) { position = c; + los.set_center(c); } |