diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-07 12:19:50 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-07 12:19:50 +0000 |
commit | b0ebf6fe9bec861aeb4687da8bb6c2c83161bd7d (patch) | |
tree | fb15555fcedc02e79ddde5f3103cd18d6d3c0b2a /crawl-ref/source/beam.cc | |
parent | 7ce4f0c31ffe27368d7a62298dcb45fd244904b1 (diff) | |
download | crawl-ref-b0ebf6fe9bec861aeb4687da8bb6c2c83161bd7d.tar.gz crawl-ref-b0ebf6fe9bec861aeb4687da8bb6c2c83161bd7d.zip |
Fix 2488357: ability beams not getting their ranges set.
I chose ranges more or less arbitrarily; better suggestions welcome.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8301 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/beam.cc')
-rw-r--r-- | crawl-ref/source/beam.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index 6cedc53a2b..08295b5241 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -268,8 +268,16 @@ bool player_tracer( zap_type ztype, int power, bolt &pbolt, int range) pbolt.reflections = 0; pbolt.bounces = 0; + // Save range before overriding it + const int old_range = pbolt.range; + if (range) + pbolt.range = range; + pbolt.fire(); + if (range) + pbolt.range = old_range; + // Should only happen if the player answered 'n' to one of those // "Fire through friendly?" prompts. if (pbolt.beam_cancelled) |