diff options
-rw-r--r-- | crawl-ref/source/l_los.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/los.cc | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/crawl-ref/source/l_los.cc b/crawl-ref/source/l_los.cc index 8130194210..1fe19e75bd 100644 --- a/crawl-ref/source/l_los.cc +++ b/crawl-ref/source/l_los.cc @@ -25,7 +25,7 @@ LUAFN(los_find_ray) GETCOORD(a, 1, 2, map_bounds); GETCOORD(b, 3, 4, map_bounds); ray_def *ray = new ray_def; - if (find_ray(a, b, false, *ray)) + if (find_ray(a, b, false, *ray, 0, true)) { lua_push_ray(ls, ray); return (1); 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; } |