From 2130c831446f0b7f2487a4704503901bf1e375e7 Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Sat, 31 Oct 2009 09:08:37 +0100 Subject: 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. --- crawl-ref/source/geom2d.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'crawl-ref/source/geom2d.h') diff --git a/crawl-ref/source/geom2d.h b/crawl-ref/source/geom2d.h index d65ea06842..37b62745df 100644 --- a/crawl-ref/source/geom2d.h +++ b/crawl-ref/source/geom2d.h @@ -76,7 +76,8 @@ struct grid double intersect(const ray &r, const line &l); double nextintersect(const ray &r, const lineseq &ls); -bool nextcell(ray &r, const grid &g, bool pass_corner); +bool nextcell(ray &r, const grid &g); +void movehalfcell(ray &r, const grid &g); } -- cgit v1.2.3-54-g00ecf