summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/actor.h
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-11-06 21:09:35 +0100
committerRobert Vollmert <rvollmert@gmx.net>2009-11-07 07:13:17 +0100
commit10273d633986cf417c52169acb14a12fc52cb018 (patch)
tree191d249b808d70172f72633c55e2e4979783df8c /crawl-ref/source/actor.h
parenta8aa8b394e1419e367eda8774d47c4c79c0aa2ea (diff)
downloadcrawl-ref-10273d633986cf417c52169acb14a12fc52cb018.tar.gz
crawl-ref-10273d633986cf417c52169acb14a12fc52cb018.zip
Give actors their own LOS.
Diffstat (limited to 'crawl-ref/source/actor.h')
-rw-r--r--crawl-ref/source/actor.h9
1 files changed, 8 insertions, 1 deletions
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