summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/terrain.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-25 14:25:13 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-25 14:25:13 +0000
commitb4b1187fa18c00dba288189dcc75d3bbb5ebf8a7 (patch)
tree6c011f1512211a03498a4ce5db585d947891700b /crawl-ref/source/terrain.cc
parent6604f9f6004e6e8d32e988a2e26b490432208095 (diff)
downloadcrawl-ref-b4b1187fa18c00dba288189dcc75d3bbb5ebf8a7.tar.gz
crawl-ref-b4b1187fa18c00dba288189dcc75d3bbb5ebf8a7.zip
Apply zebez' patch to differentiate gates some more from stairs.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10403 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/terrain.cc')
-rw-r--r--crawl-ref/source/terrain.cc19
1 files changed, 17 insertions, 2 deletions
diff --git a/crawl-ref/source/terrain.cc b/crawl-ref/source/terrain.cc
index 53cc4b97f3..4c470000eb 100644
--- a/crawl-ref/source/terrain.cc
+++ b/crawl-ref/source/terrain.cc
@@ -68,15 +68,30 @@ bool grid_is_stone_stair(dungeon_feature_type grid)
bool grid_is_staircase(dungeon_feature_type grid)
{
if (grid_is_stone_stair(grid))
+ {
+ // Make up staircases in hell appear as gates.
+ if (player_in_hell())
+ {
+ switch (grid)
+ {
+ case DNGN_STONE_STAIRS_UP_I:
+ case DNGN_STONE_STAIRS_UP_II:
+ case DNGN_STONE_STAIRS_UP_III:
+ return (false);
+ default:
+ return (true);
+ }
+ }
return (true);
+ }
// All branch entries/exits are staircases, except for Zot.
if (grid == DNGN_ENTER_ZOT || grid == DNGN_RETURN_FROM_ZOT)
return (false);
return (grid >= DNGN_ENTER_FIRST_BRANCH && grid <= DNGN_ENTER_LAST_BRANCH
- || grid >= DNGN_RETURN_FROM_FIRST_BRANCH
- && grid <= DNGN_RETURN_FROM_LAST_BRANCH);
+ || grid >= DNGN_RETURN_FROM_FIRST_BRANCH
+ && grid <= DNGN_RETURN_FROM_LAST_BRANCH);
}
bool grid_is_escape_hatch(dungeon_feature_type grid)