summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/actor.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/actor.cc')
-rw-r--r--crawl-ref/source/actor.cc22
1 files changed, 4 insertions, 18 deletions
diff --git a/crawl-ref/source/actor.cc b/crawl-ref/source/actor.cc
index 705a492221..90ff956d44 100644
--- a/crawl-ref/source/actor.cc
+++ b/crawl-ref/source/actor.cc
@@ -8,28 +8,13 @@
#include "stuff.h"
#include "traps.h"
-actor::~actor()
-{
-}
-
-bool actor::observable() const
+actor::actor()
+ : los_no_trans(los_def(coord_def(0,0), opacity_no_trans()))
{
- 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
+actor::~actor()
{
- return (target->visible_to(this) && see_cell(target->pos()));
}
bool actor::has_equipped(equipment_type eq, int sub_type) const
@@ -129,4 +114,5 @@ void actor::set_position(const coord_def &c)
{
position = c;
los.set_center(c);
+ los_no_trans.set_center(c);
}