summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-clone.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2012-03-22 01:29:15 +0100
committerAdam Borowski <kilobyte@angband.pl>2012-03-22 01:59:37 +0100
commitf88c6a77a058a02aff74443da3fd9c371877fbf3 (patch)
treece7816ba5fada182e723c537820f4542a08049c4 /crawl-ref/source/mon-clone.cc
parentf22ecef8817a579eaba48747c8327f06424393bc (diff)
downloadcrawl-ref-f88c6a77a058a02aff74443da3fd9c371877fbf3.tar.gz
crawl-ref-f88c6a77a058a02aff74443da3fd9c371877fbf3.zip
Use actor->is_player() consistently instead of (actor->atype() == ACT_PLAYER).
Shorter and more readable. I did not change the similar comparison with ACT_MONSTER yet -- are we ever going to have other actor types? God acts may work as well with a fake monster, but multiplayer/arena can possibly want a third such type. On the other hand, code assumes that non-player implies monster and vice versa, though, so I'm probably worrying without a point.
Diffstat (limited to 'crawl-ref/source/mon-clone.cc')
-rw-r--r--crawl-ref/source/mon-clone.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/crawl-ref/source/mon-clone.cc b/crawl-ref/source/mon-clone.cc
index 95189c23f6..0538d4a6fd 100644
--- a/crawl-ref/source/mon-clone.cc
+++ b/crawl-ref/source/mon-clone.cc
@@ -77,7 +77,7 @@ static bool _player_is_illusion_cloneable()
bool actor_is_illusion_cloneable(actor *target)
{
- if (target->atype() == ACT_PLAYER)
+ if (target->is_player())
{
ASSERT(target == &you);
return _player_is_illusion_cloneable();
@@ -193,7 +193,7 @@ static void _mons_load_player_enchantments(monster* creator, monster* target)
void mons_summon_illusion_from(monster* mons, actor *foe,
spell_type spell_cast)
{
- if (foe->atype() == ACT_PLAYER)
+ if (foe->is_player())
{
ASSERT(foe == &you);
if (monster *clone = create_monster(