From b6a5be8d77b7dd96d2bb0201a267abc302dca0e0 Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 27 May 2023 08:47:26 -0700 Subject: [PATCH] fix #K3922 - magic whistle vs hidden pet When a hidden pet was relocated via magic whistle, a message was given about "your appears" but it didn't show up on the map. It was being marked as no longer undetected, but that was after rloc() had moved it and redrawn its location. use_magic_whistle() needed to redraw its location again after clearing monst->mundetected. --- doc/fixes3-7-0.txt | 5 ++++- src/apply.c | 7 +++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index e1c8eccf3..f2a0fd164 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -1,4 +1,4 @@ -HDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1181 $ $NHDT-Date: 1684621591 2023/05/20 22:26:31 $ +HDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1188 $ $NHDT-Date: 1685202441 2023/05/27 15:47:21 $ General Fixes and Modified Features ----------------------------------- @@ -1595,6 +1595,9 @@ quest nemesis and a few other special monsters are suppressed from bones; running the tutorial until completion and returning to normal play but left the 'no followers' flag set; adjacent pets wouldn't tag along when hero moved to other levels +when a magic whistle moved a hidden pet it brought that out of hiding and + gave a message about "your appears" but the map was updated + while it was still hidden so nothing seemed to appear Fixes to 3.7.0-x Platform and/or Interface Problems Exposed Via git Repository diff --git a/src/apply.c b/src/apply.c index 1b7a64659..1dead6b0e 100644 --- a/src/apply.c +++ b/src/apply.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 apply.c $NHDT-Date: 1655631557 2022/06/19 09:39:17 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.381 $ */ +/* NetHack 3.7 apply.c $NHDT-Date: 1685202442 2023/05/27 15:47:22 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.420 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -540,7 +540,10 @@ magic_whistled(struct obj *obj) mnexto(mtmp, !already_discovered ? RLOC_MSG : RLOC_NONE); if (mtmp->mx != omx || mtmp->my != omy) { - mtmp->mundetected = 0; /* reveal non-mimic hider iff it moved */ + if (mtmp->mundetected) { /* reveal non-mimic hider that moved */ + mtmp->mundetected = 0; + newsym(mtmp->mx, mtmp->my); + } /* * FIXME: * All relocated monsters should change positions essentially