From: nethack.rankin Date: Thu, 24 Nov 2011 00:13:24 +0000 (+0000) Subject: autosearch while blind (trunk only) X-Git-Tag: MOVE2GIT~150 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fdf037a89f3b49044bf49270b316cd66cbc6ff86;p=nethack autosearch while blind (trunk only) From a bug report, he was running blind while wielding scissors-- I mean Excalibur--and stopped for no apparent reason. The autosearch capability conferred by that artifact (also by ring of searching, or for some roles or races once they reach a particular level) had found a secret door and changed it into a normal door, but since he couldn't see at the time his map display wasn't updated to show that. This makes the map show such things even if blind, and also gives a message that the search found something. --- diff --git a/doc/fixes35.0 b/doc/fixes35.0 index 7ab3cab04..2896757c9 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -396,6 +396,8 @@ on Plane of Water, restrict levitation and flying to air bubbles; elsewhere, restrict them such that they don't work inside solid rock wand/scroll/spell of light now hurts gremlins (lamp/candle light doesn't) ditto for hero in gremlin form (camera too) +autosearch finds and transforms secret doors and corridors even while blind, + but it wasn't updating the map to show them unless the hero could see Platform- and/or Interface-Specific Fixes diff --git a/src/detect.c b/src/detect.c index f20312c3a..3e6424bd2 100644 --- a/src/detect.c +++ b/src/detect.c @@ -1235,7 +1235,7 @@ struct trap *trap; int dosearch0(aflag) -register int aflag; +register int aflag; /* intrinsic autosearch vs explicit searching */ { #ifdef GCC_BUG /* some versions of gcc seriously muck up nested loops. if you get strange @@ -1270,17 +1270,16 @@ register int aflag; cvt_sdoor_to_door(&levl[x][y]); /* .typ = DOOR */ exercise(A_WIS, TRUE); nomul(0); - if (Blind && !aflag) - feel_location(x,y); /* make sure it shows up */ - else - newsym(x,y); + feel_location(x, y); /* make sure it shows up */ + You("find a hidden door."); } else if(levl[x][y].typ == SCORR) { if(rnl(7-fund)) continue; levl[x][y].typ = CORR; unblock_point(x,y); /* vision */ exercise(A_WIS, TRUE); nomul(0); - newsym(x,y); + feel_location(x, y); /* make sure it shows up */ + You("find a hidden passage."); } else { /* Be careful not to find anything in an SCORR or SDOOR */ if((mtmp = m_at(x, y)) && !aflag) { @@ -1343,6 +1342,7 @@ register int aflag; return(1); } +/* the 's' command -- explicit searching */ int dosearch() {