]> granicus.if.org Git - nethack/commitdiff
#M32: Astral vision vs normal vision
authorcohrs <cohrs>
Fri, 15 Apr 2005 19:42:08 +0000 (19:42 +0000)
committercohrs <cohrs>
Fri, 15 Apr 2005 19:42:08 +0000 (19:42 +0000)
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.

doc/fixes34.4
src/pager.c

index 2bb0164115b128aa7a1ae5bda0fd4bf4973688f1..442a7f0bf874f5f984d2e950661367a478db453c 100644 (file)
@@ -113,6 +113,8 @@ armor which auto-curses when worn by hero should do same if worn by monster
 limit how high accuracy, damage, or protection can become via eating rings
 when blinded hero detects a trap by touch, make sure it shows up on the map
 confused remove curse will cause loss of knowledge of items' curse/bless state
+With astral vision, the ";" command should only display "normal vision"
+       for things that could be seen without astral vision
 
 
 Platform- and/or Interface-Specific Fixes
index 53479bad0794b93c9ca63aa30432d069fcefbe57..8f9a495555bcce5e17d2539971bd3230d5bd8b54 100644 (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++;