From 8921c5b2703c3aa590026bbc8052ba129b6fc02c Mon Sep 17 00:00:00 2001 From: zelgadis Date: Mon, 26 Jan 2009 03:29:14 +0000 Subject: Fix "submerged" (hidden) trapdoor spiders being visible. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8762 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/player.cc | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/player.cc') diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index aa708a0254..83436001bf 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -2673,10 +2673,18 @@ bool player_monster_visible(const monsters *mon) // Treat monsters who are submerged due to drowning as visible, so // we get proper messages when they die. - if (mons_is_submerged(mon) && !mon->can_drown()) - return (false); + if (!mons_is_submerged(mon)) + return (true); - 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) + return (false); + + return (mon->can_drown()); } // Returns true if player is mesmerised by a given monster. -- cgit v1.2.3-54-g00ecf