summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-10-22 23:46:06 +0200
committerRobert Vollmert <rvollmert@gmx.net>2009-10-22 23:47:00 +0200
commit3f52702c6ffd30ddbce3b6205bb131bffe57dc2d (patch)
tree9672a970c2f9acfaeaa67ad5571655182ce9ef46 /crawl-ref/source
parentef6fb07fd5218af3cd14bc46fa331d0b2cadf2f3 (diff)
downloadcrawl-ref-3f52702c6ffd30ddbce3b6205bb131bffe57dc2d.tar.gz
crawl-ref-3f52702c6ffd30ddbce3b6205bb131bffe57dc2d.zip
Also remove monster::visible.
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/actor.cc2
-rw-r--r--crawl-ref/source/actor.h2
-rw-r--r--crawl-ref/source/mon-util.cc7
-rw-r--r--crawl-ref/source/monster.h1
4 files changed, 3 insertions, 9 deletions
diff --git a/crawl-ref/source/actor.cc b/crawl-ref/source/actor.cc
index 880fb7a93f..009da3ba7f 100644
--- a/crawl-ref/source/actor.cc
+++ b/crawl-ref/source/actor.cc
@@ -4,7 +4,7 @@
#include "player.h"
#include "state.h"
-bool actor::observable()
+bool actor::observable() const
{
return (crawl_state.arena || this == &you || you.can_see(this));
}
diff --git a/crawl-ref/source/actor.h b/crawl-ref/source/actor.h
index e5cf5e6277..e3dde04ff3 100644
--- a/crawl-ref/source/actor.h
+++ b/crawl-ref/source/actor.h
@@ -113,7 +113,7 @@ public:
// Visibility as required by messaging. In usual play:
// Does the player know what's happening to the actor?
- virtual bool observable();
+ virtual bool observable() const;
virtual bool is_icy() const = 0;
virtual bool is_fiery() const = 0;
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index 6ba4f7612b..8729dcbca3 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -5366,7 +5366,7 @@ bool monsters::pickup_item(item_def &item, int near, bool force)
bool monsters::need_message(int &near) const
{
return (near != -1 ? near
- : (near = visible()));
+ : (near = observable()));
}
void monsters::swap_weapons(int near)
@@ -5934,11 +5934,6 @@ bool monsters::has_damage_type(int dam_type)
return (false);
}
-bool monsters::visible() const
-{
- return (mons_near(this) && visible_to(&you));
-}
-
bool monsters::confused() const
{
return (mons_is_confused(this));
diff --git a/crawl-ref/source/monster.h b/crawl-ref/source/monster.h
index 860cf1ae0c..b4a06b9e2b 100644
--- a/crawl-ref/source/monster.h
+++ b/crawl-ref/source/monster.h
@@ -278,7 +278,6 @@ public:
bool mutate();
void banish(const std::string &who = "");
void expose_to_element(beam_type element, int strength = 0);
- bool visible() const;
int mons_species() const;