summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/beam.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-09 11:55:01 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-09 11:55:01 +0000
commita4a77c91709bf945617d9c59c1936d00d5b9be46 (patch)
tree6586157109973f6141147695c6a2cdee066b2aaf /crawl-ref/source/beam.cc
parente6d7e4233b4fec8a0cdb9b7d0d1635279454d707 (diff)
downloadcrawl-ref-a4a77c91709bf945617d9c59c1936d00d5b9be46.tar.gz
crawl-ref-a4a77c91709bf945617d9c59c1936d00d5b9be46.zip
Fix [2484866]: affects_nothing was being ignored.
Also cleaned up returning weapons somewhat; they will no longer overshoot you and then try to hit you on the way back. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8355 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/beam.cc')
-rw-r--r--crawl-ref/source/beam.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index 507c6441d0..8356b3665f 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -1957,7 +1957,8 @@ void bolt::do_fire()
while (in_bounds(pos()))
{
- affect_cell();
+ if (!affects_nothing)
+ affect_cell();
range_used++;
if (range_used >= range)
@@ -2013,10 +2014,11 @@ void bolt::do_fire()
}
// The beam has terminated.
- affect_endpoint();
+ if (!affects_nothing)
+ affect_endpoint();
// Tracers need nothing further.
- if (is_tracer)
+ if (is_tracer || affects_nothing)
return;
// Canned msg for enchantments that affected no-one, but only if the
@@ -5485,6 +5487,7 @@ void bolt::setup_retrace()
std::swap(source, target);
affects_nothing = true;
aimed_at_spot = true;
+ range_used = 0;
}
void bolt::set_agent(actor *actor)