diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-08-06 10:27:03 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-08-06 10:27:03 +0000 |
commit | 5a96a39b9d3c33a63bddcbbedb98b434e49a253f (patch) | |
tree | 9b98e621ff04d97fe38165fa80276e420aad015d | |
parent | 89f624a535856dba649ede97d272f07d7a746244 (diff) | |
download | crawl-ref-5a96a39b9d3c33a63bddcbbedb98b434e49a253f.tar.gz crawl-ref-5a96a39b9d3c33a63bddcbbedb98b434e49a253f.zip |
Fix 2038973: explosive tracer beams leaking information about invisible
monsters.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6777 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r-- | crawl-ref/source/beam.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index f1dd762d5b..53eef422ce 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -3170,10 +3170,13 @@ int affect(bolt &beam, const coord_def& p, item_def *item) if (mid != NON_MONSTER) { monsters *mon = &menv[mid]; + const bool invisible = YOU_KILL(beam.thrower) && !you.can_see(mon); // Monsters submerged in shallow water can be targeted by beams // aimed at that spot. if (mon->alive() + // Don't stop tracers on invisible monsters. + && (!invisible || !beam.is_tracer) && (!mon->submerged() || beam.aimed_at_spot && beam.target == mon->pos() && grd(mon->pos()) == DNGN_SHALLOW_WATER)) |