]> granicus.if.org Git - nethack/commitdiff
fix #7501 - searching while blind
authorPatR <rankin@nethack.org>
Fri, 2 Nov 2018 00:37:47 +0000 (17:37 -0700)
committerPatR <rankin@nethack.org>
Fri, 2 Nov 2018 00:37:47 +0000 (17:37 -0700)
My "fix github issue #38 - indentation vs 'if {}'" patch, commit
d2ae45984ed9d007112e1de3aa65fc6c04773fdf, broke finding unseen
monsters via searching.  Most notable if blind, but applied to
invisible monsters too.

doc/fixes36.2
src/detect.c

index f20c2cc02cc03a0e140b108a4725818d0df1d3f6..1ec63ad0fb993e5ceeaeb104c9bd290badb23598 100644 (file)
@@ -194,6 +194,7 @@ simplify #wizidentify; don't rely on having bold menu entries
 ensure tmp_at() structures are initialized for all code paths when swallowed
 trapped-vs-levitation/flying change broke Sting releasing hero from web
 life-saving while poly'd and Unchanging wasn't restoring u.mh (HP as monster)
+change in searching stopped finding unseen monsters except hiders and eels
 tty: turn off an optimization that is the suspected cause of Windows reported 
        partial status lines following level changes
 tty: ensure that current status fields are always copied to prior status
index 80a98509689164230947a8a0fc2aa564941e4fca..2207ae2f1567e66804f2e62779b5f625bb436fff 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.6 detect.c        $NHDT-Date: 1539908137 2018/10/19 00:15:37 $  $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.83 $ */
+/* NetHack 3.6 detect.c        $NHDT-Date: 1541119051 2018/11/02 00:37:31 $  $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.84 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /*-Copyright (c) Robert Patrick Rankin, 2018. */
 /* NetHack may be freely redistributed.  See license for details. */
@@ -1548,14 +1548,16 @@ boolean via_warning;
     if (mtmp->m_ap_type) {
         seemimic(mtmp);
         found_something = TRUE;
-    } else if (mtmp->mundetected
-               && (is_hider(mtmp->data) || mtmp->data->mlet == S_EEL)) {
-        if (via_warning) {
-            Your("warning senses cause you to take a second %s.",
-                 Blind ? "to check nearby" : "look close by");
-            display_nhwindow(WIN_MESSAGE, FALSE); /* flush messages */
+    } else {
+        if (mtmp->mundetected
+            && (is_hider(mtmp->data) || mtmp->data->mlet == S_EEL)) {
+            if (via_warning) {
+                Your("warning senses cause you to take a second %s.",
+                     Blind ? "to check nearby" : "look close by");
+                display_nhwindow(WIN_MESSAGE, FALSE); /* flush messages */
+            }
+            mtmp->mundetected = 0;
         }
-        mtmp->mundetected = 0;
         newsym(x, y);
         found_something = TRUE;
     }