From 7124f889e3c585947d594aa38be346bc87c08069 Mon Sep 17 00:00:00 2001 From: dolorous Date: Mon, 26 Jan 2009 04:43:58 +0000 Subject: Simplify checks for grids containing water. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8763 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/player.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'crawl-ref/source/player.cc') diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 83436001bf..0830998366 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -375,7 +375,7 @@ bool is_grid_dangerous(int grid) { return (!player_is_airborne() && (grid == DNGN_LAVA - || (grid == DNGN_DEEP_WATER && !player_likes_water()) )); + || (grid == DNGN_DEEP_WATER && !player_likes_water()))); } bool player_in_mappable_area( void ) @@ -2671,19 +2671,19 @@ bool player_monster_visible(const monsters *mon) if (!player_see_invis() && mon->invisible()) return (false); - // Treat monsters who are submerged due to drowning as visible, so - // we get proper messages when they die. if (!mons_is_submerged(mon)) return (true); const dungeon_feature_type feat = grd(mon->pos()); - // Monsters can only drown in lava or water, so monsters that are - // "submerged" in other features (air elementals in air, trapdoor - // spiders in the floor) are exempt from this check. - if (feat < DNGN_LAVA || feat > DNGN_WATER_STUCK) + // Treat monsters who are submerged due to drowning as visible, so + // we get proper messages when they die. Monsters can only drown in + // lava or deep water, so monsters that are "submerged" in other + // features (air elementals in air, trapdoor spiders in the floor) + // are exempt from this check. + if (feat != DNGN_LAVA && feat != DNGN_DEEP_WATER) return (false); - + return (mon->can_drown()); } -- cgit v1.2.3-54-g00ecf