summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-util.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-02-04 11:48:03 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-02-04 11:48:03 +0000
commit5be9c59587164c09a41da05a8de9e0d3588412ab (patch)
treee754dccbffe678ce3067306ca3dadc8668038eea /crawl-ref/source/spl-util.cc
parent09aad943f1aae98c6f0fd03c94583ad2afc65e09 (diff)
downloadcrawl-ref-5be9c59587164c09a41da05a8de9e0d3588412ab.tar.gz
crawl-ref-5be9c59587164c09a41da05a8de9e0d3588412ab.zip
Take range information from the beam if applicable in spell_direction().
Implements [2553289]. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8889 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spl-util.cc')
-rw-r--r--crawl-ref/source/spl-util.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/crawl-ref/source/spl-util.cc b/crawl-ref/source/spl-util.cc
index b030fe8fca..9886c334fa 100644
--- a/crawl-ref/source/spl-util.cc
+++ b/crawl-ref/source/spl-util.cc
@@ -742,6 +742,9 @@ bool spell_direction( dist &spelld, bolt &pbolt,
if (restrict != DIR_DIR)
message_current_target();
+ if (range < 1)
+ range = (pbolt.range < 1) ? LOS_RADIUS : pbolt.range;
+
direction( spelld, restrict, mode, range, false, needs_path,
may_target_monster, may_target_self, prompt, NULL,
cancel_at_self );