From db50ccc39e08efd2826459ef0bd9f209ac4ef74a Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Wed, 14 Oct 2009 15:02:20 +0200 Subject: 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. --- crawl-ref/source/los.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/los.cc') 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; } -- cgit v1.2.3-54-g00ecf