diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-02 11:20:18 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-02 11:20:18 +0000 |
commit | 2c46b8a251869fad34b31f89d32ff43f7b36be34 (patch) | |
tree | 182153a6661a82db35a69919e8a30ff5d5375e57 /crawl-ref/source/item_use.cc | |
parent | 145574d7faad160fb212d68a693454ea08d59b4f (diff) | |
download | crawl-ref-2c46b8a251869fad34b31f89d32ff43f7b36be34.tar.gz crawl-ref-2c46b8a251869fad34b31f89d32ff43f7b36be34.zip |
Factored out bolt tracer variables into tracer_info struct.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8113 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r-- | crawl-ref/source/item_use.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index d2853448af..6ced87ca08 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -1867,11 +1867,9 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus, if (!teleport && !you.confused()) { // Init tracer variables. - pbolt.foe_count = pbolt.fr_count = 0; - pbolt.foe_power = pbolt.fr_power = 0; - pbolt.fr_helped = pbolt.fr_hurt = 0; - pbolt.foe_helped = pbolt.foe_hurt = 0; - pbolt.foe_ratio = 100; + pbolt.foe_info.reset(); + pbolt.friend_info.reset(); + pbolt.foe_ratio = 100; pbolt.fire(); @@ -3562,8 +3560,10 @@ void zap_wand(int slot) // Zapping the wand isn't risky if you aim it away from all monsters // and yourself, unless there's a nearby invisible enemy and you're // trying to hit it at random. - const bool risky = dangerous && (beam.fr_count || beam.foe_count - || invis_enemy || aimed_at_self); + const bool risky = dangerous && (beam.friend_info.count + || beam.foe_info.count + || invis_enemy + || aimed_at_self); if (risky && alreadyknown && wand.sub_type == WAND_RANDOM_EFFECTS) { |