diff options
author | Neil Moore <neil@s-z.org> | 2014-06-12 02:54:59 -0400 |
---|---|---|
committer | Neil Moore <neil@s-z.org> | 2014-06-12 02:54:59 -0400 |
commit | 25b44b8c3dfb156edd6096434aba7c8da652d647 (patch) | |
tree | 3c21a0cad0d1938c7148b6d0fd63eba59f1a73bc /crawl-ref/source/tilecell.cc | |
parent | 1b874cc483bfdad51e48462da7facd4eb0d57200 (diff) | |
download | crawl-ref-25b44b8c3dfb156edd6096434aba7c8da652d647.tar.gz crawl-ref-25b44b8c3dfb156edd6096434aba7c8da652d647.zip |
Don't draw shore around mangroves (#8361)
Diffstat (limited to 'crawl-ref/source/tilecell.cc')
-rw-r--r-- | crawl-ref/source/tilecell.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/crawl-ref/source/tilecell.cc b/crawl-ref/source/tilecell.cc index 930b7a69b6..4ffe8507c3 100644 --- a/crawl-ref/source/tilecell.cc +++ b/crawl-ref/source/tilecell.cc @@ -339,20 +339,24 @@ static dungeon_feature_type _safe_feat(coord_def gc) return env.map_knowledge(gc).feat(); } +static bool _feat_is_mangrove(dungeon_feature_type feat) +{ + return feat == DNGN_TREE && player_in_branch(BRANCH_SWAMP); +} + static bool _is_seen_land(coord_def gc) { const dungeon_feature_type feat = _safe_feat(gc); - return feat != DNGN_UNSEEN && !feat_is_water(feat) && !feat_is_lava(feat); + return feat != DNGN_UNSEEN && !feat_is_water(feat) && !feat_is_lava(feat) + && !_feat_is_mangrove(feat); } static bool _is_seen_shallow(coord_def gc) { const dungeon_feature_type feat = _safe_feat(gc); - return feat == DNGN_SHALLOW_WATER || (feat == DNGN_TREE - && player_in_branch(BRANCH_SWAMP)); - + return feat == DNGN_SHALLOW_WATER || _feat_is_mangrove(feat); } static void _pack_default_waves(const coord_def &gc, packed_cell *cell) |