summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/ray.h
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2013-09-06 23:39:35 -0400
committerNeil Moore <neil@s-z.org>2013-09-06 23:41:56 -0400
commitd5d8a818bb7867862396b3f76bcd511b574ef457 (patch)
tree39e7498f602137410606c969d37463e0e69110bf /crawl-ref/source/ray.h
parentd60a8dff6c7b2c4ff34715fb0f15f1e556779101 (diff)
downloadcrawl-ref-d5d8a818bb7867862396b3f76bcd511b574ef457.tar.gz
crawl-ref-d5d8a818bb7867862396b3f76bcd511b574ef457.zip
Fix a chaos bounce crash (#5892).
It wasn't safe to change the angle of a ray that was on a corner of the 45-degree diamond grid: if the new angle pointed inside the cell, we would violate the _valid() checks. Have set_degrees (only called for chaos bouncing currently) nudge the ray inside the diamond to avoid this problem.
Diffstat (limited to 'crawl-ref/source/ray.h')
-rw-r--r--crawl-ref/source/ray.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/crawl-ref/source/ray.h b/crawl-ref/source/ray.h
index f9bc4f003f..2b6e820e4c 100644
--- a/crawl-ref/source/ray.h
+++ b/crawl-ref/source/ray.h
@@ -24,6 +24,7 @@ struct ray_def
coord_def pos() const;
bool advance();
void bounce(const reflect_grid &rg);
+ void nudge_inside();
void regress();
// Get and set the direction.