diff options
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) |