From 91480fa09bfd0c7e937cdf0b29360c9e10413f62 Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Sat, 17 Oct 2009 08:59:19 +0200 Subject: More renaming and reorganization of feature checks. There were a couple of functions is_something(dgn_feature_type feat) defined in travel.cc that were otherwise independent of travel. For consistency, move these to terrain.cc and rename to feat_is_something. One might also consider renaming the various feat_is_whatever functions to just is_whatever. --- crawl-ref/source/dungeon.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/dungeon.cc') diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc index 3cd7471f5c..5893121c55 100644 --- a/crawl-ref/source/dungeon.cc +++ b/crawl-ref/source/dungeon.cc @@ -5243,10 +5243,10 @@ bool join_the_dots(const coord_def &from, const coord_def &to, join_count++; const dungeon_feature_type feat = grd(at); - if (early_exit && at != from && is_traversable(feat)) + if (early_exit && at != from && feat_is_traversable(feat)) return (true); - if (unforbidden(at, MMT_VAULT) && !is_traversable(feat)) + if (unforbidden(at, MMT_VAULT) && !feat_is_traversable(feat)) grd(at) = DNGN_FLOOR; if (join_count > 10000) // just insurance @@ -7698,7 +7698,7 @@ struct nearest_point inline static bool _dgn_square_travel_ok(const coord_def &c) { const dungeon_feature_type feat = grd(c); - return (is_traversable(feat) || feat_is_trap(feat) + return (feat_is_traversable(feat) || feat_is_trap(feat) || feat == DNGN_SECRET_DOOR); } -- cgit v1.2.3-54-g00ecf