diff options
author | Adam Borowski <kilobyte@angband.pl> | 2012-03-22 02:13:51 +0100 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2012-03-22 02:24:33 +0100 |
commit | b27132e504b0bf0c00c25a6ae27876e801b6eed2 (patch) | |
tree | 48927a26641fffa261a6710b846b107e7f4d93e4 /crawl-ref/source/mon-clone.cc | |
parent | f88c6a77a058a02aff74443da3fd9c371877fbf3 (diff) | |
download | crawl-ref-b27132e504b0bf0c00c25a6ae27876e801b6eed2.tar.gz crawl-ref-b27132e504b0bf0c00c25a6ae27876e801b6eed2.zip |
Use actor->is_player() instead of (actor == &you) as well.
Not so sure here as the latter is a bit faster (comparison with a constant
vs a virtual method call), but consistency is good. Perhaps we should use
the latter way after all? In any case, it should be the same everywhere
-- if someone has some insight, say a word so we can sed it again.
Diffstat (limited to 'crawl-ref/source/mon-clone.cc')
-rw-r--r-- | crawl-ref/source/mon-clone.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crawl-ref/source/mon-clone.cc b/crawl-ref/source/mon-clone.cc index 0538d4a6fd..66cc1f135d 100644 --- a/crawl-ref/source/mon-clone.cc +++ b/crawl-ref/source/mon-clone.cc @@ -79,7 +79,7 @@ bool actor_is_illusion_cloneable(actor *target) { if (target->is_player()) { - ASSERT(target == &you); + ASSERT(target->is_player()); return _player_is_illusion_cloneable(); } else @@ -195,7 +195,7 @@ void mons_summon_illusion_from(monster* mons, actor *foe, { if (foe->is_player()) { - ASSERT(foe == &you); + ASSERT(foe->is_player()); if (monster *clone = create_monster( mgen_data(MONS_PLAYER_ILLUSION, SAME_ATTITUDE(mons), mons, 6, spell_cast, mons->pos(), mons->foe, 0))) |