diff options
author | Robert Vollmert <rvollmert@gmx.net> | 2009-10-15 10:18:33 +0200 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2009-10-15 10:46:34 +0200 |
commit | 77deedc3637e918201878fa4e1424d7287ec3af2 (patch) | |
tree | 6419bf593a2c05d7d3f3f5ea1a5fe474896c775a /crawl-ref/source/los.cc | |
parent | 4eac726aa12ebf0264d87a1867fda025f020ac70 (diff) | |
download | crawl-ref-77deedc3637e918201878fa4e1424d7287ec3af2.tar.gz crawl-ref-77deedc3637e918201878fa4e1424d7287ec3af2.zip |
Assert invariant in find_ray.
Diffstat (limited to 'crawl-ref/source/los.cc')
-rw-r--r-- | crawl-ref/source/los.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crawl-ref/source/los.cc b/crawl-ref/source/los.cc index 586b96b7ad..352230000f 100644 --- a/crawl-ref/source/los.cc +++ b/crawl-ref/source/los.cc @@ -639,6 +639,12 @@ bool _find_ray_se(const coord_def& target, bool allow_fallback, const double ray_slope_diff = find_shortest ? fabs(_slope_factor(lray) - want_slope) : 0.0; + if (!blocked && find_shortest) + { + // any unaliased ray should have the same length + ASSERT(real_length == target.rdist()); + } + if (blocked || (find_shortest && !_superior_ray(shortest, imbalance, real_length, cimbalance, |