From 609f9f15707606beddea5f0ee9bef249296b119c Mon Sep 17 00:00:00 2001 From: zelgadis Date: Sat, 10 Jan 2009 08:21:07 +0000 Subject: Include the end-point of a beam in path_taken. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8375 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/beam.cc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'crawl-ref/source/beam.cc') diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index e0a1c2417d..ba1b795928 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -1551,10 +1551,6 @@ void bolt::initialize_fire() if (see_grid(source) && target == source && !invisible()) seen = true; - // Self-targeted beams have a "path" consisting the source position. - if (target == source) - path_taken.push_back(source); - #if DEBUG_DIAGNOSTICS mprf( MSGCH_DIAGNOSTICS, "%s%s%s [%s] (%d,%d) to (%d,%d): " "ty=%d col=%d flav=%d hit=%d dam=%dd%d range=%d", @@ -1958,6 +1954,8 @@ void bolt::do_fire() while (in_bounds(pos())) { + path_taken.push_back(pos()); + if (!affects_nothing) affect_cell(); @@ -1974,8 +1972,6 @@ void bolt::do_fire() ASSERT(!grid_is_solid(grd(pos())) || (is_tracer && affects_wall(grd(pos())))); - path_taken.push_back(pos()); - const bool was_seen = seen; if (!was_seen && range > 0 && !invisible() && see_grid(pos())) seen = true; -- cgit v1.2.3-54-g00ecf