summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-util.cc
diff options
context:
space:
mode:
authorabrahamwl <abrahamwl@gmail.com>2009-10-30 18:06:32 -0700
committerSteven Noonan <steven@uplinklabs.net>2009-10-30 21:37:19 -0700
commitef456d5cbf1a159010d28f0ab5bd9ef3e35143c7 (patch)
tree2c4da965a411cf78b4c5a58fdd7546e435fd3f2b /crawl-ref/source/mon-util.cc
parent9e0fc66a0d3b9bdf502d0726828ba1ed89302816 (diff)
downloadcrawl-ref-ef456d5cbf1a159010d28f0ab5bd9ef3e35143c7.tar.gz
crawl-ref-ef456d5cbf1a159010d28f0ab5bd9ef3e35143c7.zip
Combine mons_is_sleeping(monsters *m) into monsters::asleep()
...and replace all references to mons_is_sleeping with asleep.
Diffstat (limited to 'crawl-ref/source/mon-util.cc')
-rw-r--r--crawl-ref/source/mon-util.cc9
1 files changed, 2 insertions, 7 deletions
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index 739ef32b8e..6488529c0d 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -2750,11 +2750,6 @@ bool mons_is_caught(const monsters *m)
return (m->has_ench(ENCH_HELD));
}
-bool mons_is_sleeping(const monsters *m)
-{
- return (m->behaviour == BEH_SLEEP);
-}
-
bool mons_is_wandering(const monsters *m)
{
return (m->behaviour == BEH_WANDER);
@@ -5988,7 +5983,7 @@ bool monsters::cannot_move() const
bool monsters::asleep() const
{
- return (mons_is_sleeping(this));
+ return (behaviour == BEH_SLEEP);
}
bool monsters::backlit(bool check_haloed) const
@@ -7415,7 +7410,7 @@ void monsters::apply_enchantment(const mon_enchant &me)
case ENCH_HELD:
{
if (mons_is_stationary(this) || mons_cannot_act(this)
- || mons_is_sleeping(this))
+ || asleep())
{
break;
}