summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/dungeon.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-27 20:15:24 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-27 20:15:24 +0000
commit66c149dbd38eca4599dd015b9271d2e1bcf46472 (patch)
tree160ae3e19f11630e8d0333b5b43098ef5a72773b /crawl-ref/source/dungeon.cc
parent70ce5c5c0ce725bdb808bc5d5e7b216a7707e911 (diff)
downloadcrawl-ref-66c149dbd38eca4599dd015b9271d2e1bcf46472.tar.gz
crawl-ref-66c149dbd38eca4599dd015b9271d2e1bcf46472.zip
Modify num_feats_between to return early if a feature has been
encountered and we're only interested in whether the path is clear or not. Also, more whitespace/comment changes. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5298 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/dungeon.cc')
-rw-r--r--crawl-ref/source/dungeon.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc
index 01589b1c8f..7855e3db40 100644
--- a/crawl-ref/source/dungeon.cc
+++ b/crawl-ref/source/dungeon.cc
@@ -7384,6 +7384,7 @@ static coord_def _dgn_find_closest_to_stone_stairs(coord_def base_pos)
if (!travel_point_distance[x][y] && grid_is_stone_stair(grd[x][y]))
_dgn_fill_zone(coord_def(x, y), 1, np, _dgn_square_travel_ok);
}
+
return (np.nearest);
}