diff options
author | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-10 08:21:07 +0000 |
---|---|---|
committer | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-10 08:21:07 +0000 |
commit | 609f9f15707606beddea5f0ee9bef249296b119c (patch) | |
tree | 571d303c6b66dbd9a24dc7379ebeb1e0b46ab0b8 /crawl-ref/source/beam.cc | |
parent | d43aba40fe04048d1d032b3b6b105eb45dce4152 (diff) | |
download | crawl-ref-609f9f15707606beddea5f0ee9bef249296b119c.tar.gz crawl-ref-609f9f15707606beddea5f0ee9bef249296b119c.zip |
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
Diffstat (limited to 'crawl-ref/source/beam.cc')
-rw-r--r-- | crawl-ref/source/beam.cc | 8 |
1 files changed, 2 insertions, 6 deletions
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; |