diff options
author | Robert Vollmert <rvollmert@gmx.net> | 2009-10-14 17:31:37 +0200 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2009-10-14 17:34:06 +0200 |
commit | 1d80b711e7f786e411e0542a5d879bda1d384b7b (patch) | |
tree | 5849023f9ef661f327d337e937d0b56b59dba377 /crawl-ref/source | |
parent | 70c5ac5066b5f76e6da7177116e2895df95df36b (diff) | |
download | crawl-ref-1d80b711e7f786e411e0542a5d879bda1d384b7b.tar.gz crawl-ref-1d80b711e7f786e411e0542a5d879bda1d384b7b.zip |
Fix beams not being show when targetting.
This was because directn.cc silently assumes find_ray returns
true when source == target...
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/los.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/crawl-ref/source/los.cc b/crawl-ref/source/los.cc index d5f5e9a84a..586b96b7ad 100644 --- a/crawl-ref/source/los.cc +++ b/crawl-ref/source/los.cc @@ -682,7 +682,10 @@ bool find_ray(const coord_def& source, const coord_def& target, bool find_shortest, bool ignore_solid) { if (target == source) - return false; + { + // XXX: directn expects true, even if the ray is invalid + return true; + } const int signx = ((target.x - source.x >= 0) ? 1 : -1); const int signy = ((target.y - source.y >= 0) ? 1 : -1); |