]> granicus.if.org Git - nethack/commitdiff
autodescribe vs MSGTYPE
authorPatR <rankin@nethack.org>
Fri, 27 Nov 2020 19:10:44 +0000 (11:10 -0800)
committerPatR <rankin@nethack.org>
Fri, 27 Nov 2020 19:10:44 +0000 (11:10 -0800)
I was baffled about why moving the cursor across a fire elemental
kept putting up --More-- until I remembered that I once used
 MSGTYPE=stop "[Ff]ire"
to test Qt's handling for that.  Turns out that I left it in my
config file.  autodescribe feedback should not be honoring that;
honoring MSGTYPE=norepeat is not as clear-cut but this disables
it too.

User sounds were also kept enabled during autodescribe but I have
no way to test them.  Like norepeat, disabling just falls into
place.

The pline.c change is unrelated.  It just eliminates a wide line
(from adding 'g.') in the source by using a shorter variable name.

doc/fixes37.0
src/do_name.c
src/pline.c

index f8f4b42c56f09e9c6a6761c98f28c77544426d0f..c5e5d77bea41b0bac2cb6411c3ed0ec6e349835d 100644 (file)
@@ -1,4 +1,4 @@
-NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.365 $ $NHDT-Date: 1606473484 2020/11/27 10:38:04 $
+NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.366 $ $NHDT-Date: 1606504240 2020/11/27 19:10:40 $
 
 General Fixes and Modified Features
 -----------------------------------
@@ -312,6 +312,8 @@ throwing or kicking a shop container (that's light enough to move) made the
        hero pay for any gold inside, then didn't refund that amount if the
        container landed inside the shop
 try to fix message sequencing for tame golems that "roast/rot/rust in peace"
+autodescribe when moving the cursor was erroneously honoring MSGTYPE=stop
+       and potentially delivering sounds
 
 
 Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
index cc58b329031cd8276e3e7668ff9fd4f56b4f8906..8484419b49379f1e77a42ab1c92b4d48b0085142 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.7 do_name.c       $NHDT-Date: 1596498162 2020/08/03 23:42:42 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.182 $ */
+/* NetHack 3.7 do_name.c       $NHDT-Date: 1606504240 2020/11/27 19:10:40 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.184 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /*-Copyright (c) Pasi Kallinen, 2018. */
 /* NetHack may be freely redistributed.  See license for details. */
@@ -556,7 +556,7 @@ int cx, cy;
     if (do_screen_description(cc, TRUE, sym, tmpbuf, &firstmatch,
                               (struct permonst **) 0)) {
         (void) coord_desc(cx, cy, tmpbuf, iflags.getpos_coords);
-        custompline(SUPPRESS_HISTORY,
+        custompline((SUPPRESS_HISTORY | OVERRIDE_MSGTYPE),
                     "%s%s%s%s%s", firstmatch, *tmpbuf ? " " : "", tmpbuf,
                     (iflags.autodescribe
                      && getpos_getvalid && !(*getpos_getvalid)(cx, cy))
index 96715481a1226dcefd04992cebe852e95d087d27..f88a34d887cedfb23c39090d6adf4bdf6caa84be 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.7 pline.c $NHDT-Date: 1596498196 2020/08/03 23:43:16 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.96 $ */
+/* NetHack 3.7 pline.c $NHDT-Date: 1606504240 2020/11/27 19:10:40 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.100 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /*-Copyright (c) Robert Patrick Rankin, 2018. */
 /* NetHack may be freely redistributed.  See license for details. */
@@ -50,16 +50,16 @@ const char *line;
 }
 
 /* called during save (unlike the interface-specific message history,
-   this data isn't saved and restored); end-of-game releases saved_pline[]
+   this data isn't saved and restored); end-of-game releases saved_plines[]
    while writing its contents to the final dump log */
 void
 dumplogfreemessages()
 {
-    unsigned indx;
+    unsigned i;
 
-    for (indx = 0; indx < DUMPLOG_MSG_COUNT; ++indx)
-        if (g.saved_plines[indx])
-            free((genericptr_t) g.saved_plines[indx]), g.saved_plines[indx] = 0;
+    for (i = 0; i < DUMPLOG_MSG_COUNT; ++i)
+        if (g.saved_plines[i])
+            free((genericptr_t) g.saved_plines[i]), g.saved_plines[i] = 0;
     g.saved_pline_index = 0;
 }
 #endif