From 10273d633986cf417c52169acb14a12fc52cb018 Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Fri, 6 Nov 2009 21:09:35 +0100 Subject: Give actors their own LOS. --- crawl-ref/source/actor.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'crawl-ref/source/actor.h') diff --git a/crawl-ref/source/actor.h b/crawl-ref/source/actor.h index c18722f5c1..000eba813f 100644 --- a/crawl-ref/source/actor.h +++ b/crawl-ref/source/actor.h @@ -1,6 +1,8 @@ #ifndef ACTOR_H #define ACTOR_H +#include "los_def.h" + class actor { public: @@ -107,7 +109,9 @@ public: virtual bool visible_to(const actor *looker) const = 0; // Is the given cell within LOS of the actor? - virtual bool see_cell(const coord_def &c) const = 0; + virtual bool see_cell(const coord_def &c) const; + + virtual void update_los(); // Can the actor actually see the target? virtual bool can_see(const actor *target) const; @@ -221,6 +225,9 @@ public: virtual bool do_shaft() = 0; coord_def position; + +protected: + los_def los; }; #endif -- cgit v1.2.3-54-g00ecf