diff options
author | Robert Vollmert <rvollmert@gmx.net> | 2009-10-31 09:08:37 +0100 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2009-11-01 21:45:24 +0100 |
commit | 2130c831446f0b7f2487a4704503901bf1e375e7 (patch) | |
tree | a7b601a88b936ccf45d579cd0e8d43caad6d9b14 /crawl-ref/source/ray.h | |
parent | a062c664e4802851fba4cc5a001e49a61698f4a3 (diff) | |
download | crawl-ref-2130c831446f0b7f2487a4704503901bf1e375e7.tar.gz crawl-ref-2130c831446f0b7f2487a4704503901bf1e375e7.zip |
Change corner handling.
ray_def should now deal with hitting corners gracefully, though the
raycasting will still discard such rays. If a ray hits a corner
between two diamonds, it will stay there, and calling ray_def::pos
will arbitrarily give one of the squares -- this is not optimal,
but these rays shouldn't usually show up anyway.
Diffstat (limited to 'crawl-ref/source/ray.h')
-rw-r--r-- | crawl-ref/source/ray.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crawl-ref/source/ray.h b/crawl-ref/source/ray.h index 477f8fcbf7..671ca0fa8a 100644 --- a/crawl-ref/source/ray.h +++ b/crawl-ref/source/ray.h @@ -11,11 +11,12 @@ struct ray_def { geom::ray r; + bool on_corner; int cycle_idx; ray_def() {} ray_def(const geom::ray& _r) - : r(_r), cycle_idx(0) {} + : r(_r), on_corner(false), cycle_idx(0) {} coord_def pos() const; bool advance(); |