#M32: Astral vision vs normal vision

While wearing EotO, ";" and selecting a monster behind a wall would display
"normal vision" as well as "astral vision".  This is because cansee() gets
set for things seen via astral vision.  However, couldsee() is only set for
things that could be seen normally, so check both values.
This commit is contained in:
cohrs
2005-04-15 19:42:08 +00:00
parent 15f309d118
commit a85d3bf01c
2 changed files with 7 additions and 2 deletions

View File

@@ -162,8 +162,11 @@ lookat(x, y, buf, monbuf)
boolean useemon = (boolean) canseemon(mtmp);
xraydist = (u.xray_range<0) ? -1 : u.xray_range * u.xray_range;
/* normal vision */
if ((mtmp->wormno ? worm_known(mtmp) : cansee(mtmp->mx, mtmp->my)) &&
/* normal vision
* cansee is true for both normal and astral vision,
* but couldsee it not true for astral vision */
if ((mtmp->wormno ? worm_known(mtmp) :
(cansee(mtmp->mx, mtmp->my) && couldsee(mtmp->mx, mtmp->my))) &&
mon_visible(mtmp) && !mtmp->minvis) {
ways_seen++;
normal++;