summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells2.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-28 20:48:37 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-28 20:48:37 +0000
commit7630def4bbd001c8492deafeb28b95a6caccb4e4 (patch)
tree147e2f17781f9b9820c7c40207548985a2923de1 /crawl-ref/source/spells2.cc
parent6d5bf15adddfa9829fa99c097ad715432f449c2f (diff)
downloadcrawl-ref-7630def4bbd001c8492deafeb28b95a6caccb4e4.tar.gz
crawl-ref-7630def4bbd001c8492deafeb28b95a6caccb4e4.zip
Forward-port the remaining applicable parts of 0.5 r10447.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10455 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells2.cc')
-rw-r--r--crawl-ref/source/spells2.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc
index 2a0de0becd..ba2dfa6d27 100644
--- a/crawl-ref/source/spells2.cc
+++ b/crawl-ref/source/spells2.cc
@@ -198,9 +198,12 @@ int detect_creatures(int pow, bool telepathic)
{
if (monsters *mon = monster_at(*ri))
{
- creatures_found++;
-
- _mark_detected_creature(*ri, mon, fuzz_chance, fuzz_radius);
+ // If you can see the monster, don't "detect" it elsewhere.
+ if (!mons_near(mon) || !player_monster_visible(mon))
+ {
+ creatures_found++;
+ _mark_detected_creature(*ri, mon, fuzz_chance, fuzz_radius);
+ }
// Assuming that highly intelligent spellcasters can
// detect scrying. -- bwr