summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/travel.cc
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2013-10-02 19:36:16 -0400
committerNeil Moore <neil@s-z.org>2013-10-02 19:40:03 -0400
commit5e1fb2db7c418ec238fc3ed5d3841db2598a0e20 (patch)
tree32a9e5cc053ec9f1f8310319dc5764c322c88a74 /crawl-ref/source/travel.cc
parentc4feb4ae945771017307163f9fee7f1dd3064c22 (diff)
downloadcrawl-ref-5e1fb2db7c418ec238fc3ed5d3841db2598a0e20.tar.gz
crawl-ref-5e1fb2db7c418ec238fc3ed5d3841db2598a0e20.zip
Ignore most traps in connectivity checks.
Only teleport and shaft traps break connectivity. Also, don't ignore zot and alarm traps for running/travel checks.
Diffstat (limited to 'crawl-ref/source/travel.cc')
-rw-r--r--crawl-ref/source/travel.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/crawl-ref/source/travel.cc b/crawl-ref/source/travel.cc
index 5719315451..1125b98104 100644
--- a/crawl-ref/source/travel.cc
+++ b/crawl-ref/source/travel.cc
@@ -263,8 +263,12 @@ bool feat_is_traversable_now(dungeon_feature_type grid, bool try_fallback)
// Ignores swimming, flying, and travel_avoid_terrain.
bool feat_is_traversable(dungeon_feature_type feat, bool try_fallback)
{
- if (feat >= DNGN_TRAP_MECHANICAL && feat <= DNGN_TRAP_WEB)
+ if (feat_is_trap(feat) && feat != DNGN_PASSAGE_OF_GOLUBRIA)
+ {
+ if (ignore_player_traversability)
+ return !(feat == DNGN_TRAP_SHAFT || feat == DNGN_TRAP_TELEPORT);
return false;
+ }
else if (feat == DNGN_TELEPORTER) // never ever enter it automatically
return false;
else if (feat >= DNGN_MINWALK || feat == DNGN_RUNED_DOOR