From a4a77c91709bf945617d9c59c1936d00d5b9be46 Mon Sep 17 00:00:00 2001 From: haranp Date: Fri, 9 Jan 2009 11:55:01 +0000 Subject: 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 --- crawl-ref/source/beam.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/beam.cc') 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) -- cgit v1.2.3-54-g00ecf