diff options
author | Robert Vollmert <rvollmert@gmx.net> | 2009-10-14 15:02:20 +0200 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2009-10-14 15:04:05 +0200 |
commit | db50ccc39e08efd2826459ef0bd9f209ac4ef74a (patch) | |
tree | 09d7bc3a43409d33df48a587897349785c5819f2 /crawl-ref/source/los.cc | |
parent | 8583568428f7234e0f7b1d2cd2dc3af47c8210be (diff) | |
download | crawl-ref-db50ccc39e08efd2826459ef0bd9f209ac4ef74a.tar.gz crawl-ref-db50ccc39e08efd2826459ef0bd9f209ac4ef74a.zip |
Fix bug with find_ray always falling back.
This was caused by an incorrectly inverted test.
Also update the find_ray binding so the findray test would have
found the bug.
Diffstat (limited to 'crawl-ref/source/los.cc')
-rw-r--r-- | crawl-ref/source/los.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/los.cc b/crawl-ref/source/los.cc index ba8d36848d..b2756e943d 100644 --- a/crawl-ref/source/los.cc +++ b/crawl-ref/source/los.cc @@ -644,9 +644,9 @@ bool find_ray(const coord_def& source, const coord_def& target, fabs(_slope_factor(lray) - want_slope) : 0.0; if (blocked || (find_shortest && - _superior_ray(shortest, imbalance, - real_length, cimbalance, - slope_diff, ray_slope_diff))) + !_superior_ray(shortest, imbalance, + real_length, cimbalance, + slope_diff, ray_slope_diff))) { continue; } |