summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-behv.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/mon-behv.cc')
-rw-r--r--crawl-ref/source/mon-behv.cc25
1 files changed, 11 insertions, 14 deletions
diff --git a/crawl-ref/source/mon-behv.cc b/crawl-ref/source/mon-behv.cc
index f7be683b9b..4335854400 100644
--- a/crawl-ref/source/mon-behv.cc
+++ b/crawl-ref/source/mon-behv.cc
@@ -40,21 +40,18 @@ static void _check_lava_water_in_sight()
// XXX: remove explicit coordinate translation.
const coord_def ep = *ri - you.pos() + coord_def(ENV_SHOW_OFFSET,
ENV_SHOW_OFFSET);
- if (env.show(ep))
+ const dungeon_feature_type feat = grd(*ri);
+ if (feat == DNGN_LAVA)
{
- const dungeon_feature_type feat = grd(*ri);
- if (feat == DNGN_LAVA)
- {
- you.lava_in_sight = 1;
- if (you.water_in_sight > 0)
- break;
- }
- else if (feat == DNGN_DEEP_WATER)
- {
- you.water_in_sight = 1;
- if (you.lava_in_sight > 0)
- break;
- }
+ you.lava_in_sight = 1;
+ if (you.water_in_sight > 0)
+ break;
+ }
+ else if (feat == DNGN_DEEP_WATER)
+ {
+ you.water_in_sight = 1;
+ if (you.lava_in_sight > 0)
+ break;
}
}
}