diff options
author | Adam Borowski <kilobyte@angband.pl> | 2012-12-03 02:48:13 +0100 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2012-12-03 02:56:38 +0100 |
commit | 837be7a97a2ba7e69d82c6ad31dd0a1e2dff7b2d (patch) | |
tree | 306b541483d3b5171587de2bbc548e9dc4be1fbe /crawl-ref/source/spl-tornado.cc | |
parent | fb8e48448e29bc3f80b4b1bbe21107960e9acc21 (diff) | |
download | crawl-ref-837be7a97a2ba7e69d82c6ad31dd0a1e2dff7b2d.tar.gz crawl-ref-837be7a97a2ba7e69d82c6ad31dd0a1e2dff7b2d.zip |
Revert "Prevent Tornado from moving monsters through solid features."
That commit broke assumptions that if an actor can be swept from A to B and
from B to C, he can be swept from A to C as well. This caused crashes on
some permutations; also, longer turns (a slowed naga of Chei) tended to
pile actors up on one side of an obstacle.
For now, I made grates airtight so the main problem that commit was supposed
to fix is papered over. Trees are not airtight which allows people to get
swept through them; this is not good but has nearly no practical
implications.
This reverts commit 6f473416a0b6cffe0759a792ac536c739c4a395f.
Diffstat (limited to 'crawl-ref/source/spl-tornado.cc')
-rw-r--r-- | crawl-ref/source/spl-tornado.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/crawl-ref/source/spl-tornado.cc b/crawl-ref/source/spl-tornado.cc index e078aec5b6..4f74ff2c84 100644 --- a/crawl-ref/source/spl-tornado.cc +++ b/crawl-ref/source/spl-tornado.cc @@ -23,7 +23,12 @@ static bool _airtight(coord_def c) { - return grd(c) <= DNGN_MAXWALL; + // Broken by 6f473416 -- we should re-allow the wind through grates; this + // simplicistic check allows moving people through trees which is no good + // either. + + // return grd(c) <= DNGN_MAXWALL && grd(c) != DNGN_MANGROVE; + return grd(c) <= DNGN_GRATE && grd(c) != DNGN_MANGROVE; } /* Explanation of the algorithm: @@ -170,11 +175,6 @@ static coord_def _rotate(coord_def org, coord_def from, ang0 -= 2 * PI; for (unsigned int i = 0; i < avail.size(); i++) { - // If the path is blocked - say the monster is in a cage - - // veto the cell. - if (!cell_see_cell(from, avail[i], LOS_SOLID_SEE)) - continue; - double dist = sqrt((avail[i] - org).abs()); double distdiff = fabs(dist - dist0); double ang = atan2(avail[i].x - org.x, avail[i].y - org.y); |