From: PatR Date: Fri, 2 Nov 2018 00:37:47 +0000 (-0700) Subject: fix #7501 - searching while blind X-Git-Tag: NetHack-3.6.2_Released~172^2~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ac81022eed87429a911c711f75112e3e79e4656f;p=nethack fix #7501 - searching while blind 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. --- diff --git a/doc/fixes36.2 b/doc/fixes36.2 index f20c2cc02..1ec63ad0f 100644 --- a/doc/fixes36.2 +++ b/doc/fixes36.2 @@ -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 diff --git a/src/detect.c b/src/detect.c index 80a985096..2207ae2f1 100644 --- a/src/detect.c +++ b/src/detect.c @@ -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; }