summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/travel.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-09-20 23:15:10 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-09-20 23:15:10 +0000
commitd3691fbcbf25a9197f5aef0d7c21f632ec5777d3 (patch)
treeba5c36d6d5b2f00ac4e8e6ba48fbeefc98a27fdd /crawl-ref/source/travel.cc
parentedba7af2f76d236df1e7562c435aa7ab5dc1d4fa (diff)
downloadcrawl-ref-d3691fbcbf25a9197f5aef0d7c21f632ec5777d3.tar.gz
crawl-ref-d3691fbcbf25a9197f5aef0d7c21f632ec5777d3.zip
Add some comments.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10761 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/travel.cc')
-rw-r--r--crawl-ref/source/travel.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/crawl-ref/source/travel.cc b/crawl-ref/source/travel.cc
index d076fda801..ec650dbd3b 100644
--- a/crawl-ref/source/travel.cc
+++ b/crawl-ref/source/travel.cc
@@ -2002,13 +2002,18 @@ void find_travel_pos(const coord_def& youpos,
if (unseen != coord_def())
{
- // If so, try to use another adjacent grid that does
+ // If so, try to use an orthogonally adjacent grid that is
+ // safe to enter.
if (youpos.x == unseen.x)
new_dest.y = youpos.y;
else if (youpos.y == unseen.y)
new_dest.x = youpos.x;
// If the new grid cannot be entered, reset to dest.
+ // This means that autoexplore will still sometimes move you
+ // next to a previously unseen monster but the same would
+ // happen by manual movement, so I don't think we need to worry
+ // about this. (jpeg)
if (!is_travelsafe_square(new_dest)
|| !is_traversable(grd(new_dest)))
{