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/spl-tornado.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/spl-tornado.cc')
-rw-r--r-- | crawl-ref/source/spl-tornado.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/spl-tornado.cc b/crawl-ref/source/spl-tornado.cc index e70c5a23fc..c79fea8c2e 100644 --- a/crawl-ref/source/spl-tornado.cc +++ b/crawl-ref/source/spl-tornado.cc @@ -281,7 +281,7 @@ void tornado_damage(actor *caster, int dur) set_terrain_changed(*dam_i); if (you.see_cell(*dam_i)) mpr("A tree falls to the hurricane!"); - if (caster == &you) + if (caster->is_player()) did_god_conduct(DID_KILL_PLANT, 1); } @@ -296,7 +296,7 @@ void tornado_damage(actor *caster, int dur) leda = true; // and with fish, too continue; } - if (victim == &you && monster_at(*dam_i)) + if (victim->is_player() && monster_at(*dam_i)) { // A far-fetched case: you're using Fedhas' passthrough // or standing on a submerged air elemental, there are @@ -423,7 +423,7 @@ void tornado_damage(actor *caster, int dur) ASSERT(move_act[i]->pos() == newpos); } - if (caster == &you) + if (caster->is_player()) fire_final_effects(); } |