summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-07-21 22:06:47 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-07-21 22:06:47 +0000
commitc7204a0af4ce30627257e32945fe46d2fc915860 (patch)
tree110e66a34b95770041a0be9e0f8d5503c42ba8cd
parentf513b211cad51c05ee80dd68400600c6ed96b34c (diff)
downloadcrawl-ref-c7204a0af4ce30627257e32945fe46d2fc915860.tar.gz
crawl-ref-c7204a0af4ce30627257e32945fe46d2fc915860.zip
[1757888] yell() was leaking information about invisible monsters.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1903 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/effects.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index 9c840ec29e..bae43a8677 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -1532,7 +1532,8 @@ void yell(void)
return;
}
- if (!targ.isValid || mgrd[targ.tx][targ.ty] == NON_MONSTER)
+ if (!targ.isValid || mgrd[targ.tx][targ.ty] == NON_MONSTER ||
+ !player_monster_visible(&env.mons[mgrd[targ.tx][targ.ty]]))
{
mpr("Yeah, whatever.");
return;