diff options
author | gammafunk <gammafunk@gmail.com> | 2014-03-13 00:53:42 -0500 |
---|---|---|
committer | gammafunk <gammafunk@gmail.com> | 2014-03-13 01:33:48 -0500 |
commit | 5c89200ae60cbd66809c35112ba9085dc0c21405 (patch) | |
tree | bca53dfcced77073b4c4f308c8f152a7643bd016 /crawl-ref/source/show.cc | |
parent | 9acb974c36e13d6e1e53acfe12559f82a054166a (diff) | |
download | crawl-ref-5c89200ae60cbd66809c35112ba9085dc0c21405.tar.gz crawl-ref-5c89200ae60cbd66809c35112ba9085dc0c21405.zip |
Use the correct radius when sensing invisible monsters in LOS (MarvinPA).
Before we were letting the player detect all invisible enemies in LOS
if they had antennae, regardless of mutation level, and were not
checking either Ashenzari's detection radius nor that from the boots
of the assassin at all. This commit also cleans up and documents a few
related functions.
Diffstat (limited to 'crawl-ref/source/show.cc')
-rw-r--r-- | crawl-ref/source/show.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crawl-ref/source/show.cc b/crawl-ref/source/show.cc index 73c9fedfbc..ba4bc77515 100644 --- a/crawl-ref/source/show.cc +++ b/crawl-ref/source/show.cc @@ -474,8 +474,9 @@ static void _update_monster(monster* mons) if (mons->submerged()) return; + int range2 = dist_range(player_monster_detect_radius()); if (mons->constricted_by == MID_PLAYER - || player_mutation_level(MUT_ANTENNAE)) + || (range2 > 1 && (you.pos() - mons->pos()).abs() <= range2)) { _mark_invisible_at(gp); return; |