diff options
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/enum.h | 3 | ||||
-rw-r--r-- | crawl-ref/source/terrain.cc | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h index a586496844..adfef29372 100644 --- a/crawl-ref/source/enum.h +++ b/crawl-ref/source/enum.h @@ -1018,6 +1018,9 @@ enum dungeon_feature_type DNGN_GRANITE_STATUE = 21, // 21 DNGN_STATUE_RESERVED, + // Highest solid grid value. + DNGN_MAXSOLID = DNGN_STATUE_RESERVED, + // Lowest grid value which can be passed by walking etc. DNGN_MINMOVE = 31, diff --git a/crawl-ref/source/terrain.cc b/crawl-ref/source/terrain.cc index ad8ace64e9..cdd0ef6a43 100644 --- a/crawl-ref/source/terrain.cc +++ b/crawl-ref/source/terrain.cc @@ -186,12 +186,12 @@ command_type grid_stair_direction(dungeon_feature_type grid) bool grid_is_opaque(dungeon_feature_type grid) { - return (grid < DNGN_MINSEE); + return (grid <= DNGN_MAXOPAQUE); } bool grid_is_solid(dungeon_feature_type grid) { - return (grid < DNGN_MINMOVE); + return (grid <= DNGN_MAXSOLID); } bool grid_is_solid(int x, int y) |