From 38df5360e0b6b1670e9a0b9076e5897746fffe21 Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 7 Apr 2018 16:08:10 -0700 Subject: [PATCH] fix #H7039 - autodescribe of hallucinated statue Having the autodescribe feature enabled and moving the cursor onto a statue yields "statue of a " under normal circumtances, but when done while hallucinating the feedback was just blank (because the lookat() code couldn't find any monster at statue's location). Now it will be "" (not "statue of a ") instead, same as when moving cursor over glyphs of actual monsters. --- doc/fixes36.1 | 1 + src/pager.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/fixes36.1 b/doc/fixes36.1 index e95ecb7de..24edd3550 100644 --- a/doc/fixes36.1 +++ b/doc/fixes36.1 @@ -629,6 +629,7 @@ gas spore explosion killing a gas spore which triggers a recursive explosion explosions causing multiple levels of recursion) if multiple bands of blank lines were squeezed out of DUMPLOG's map, spurious blank lines appeared in the final map output +cursor positioning autodescribe of a statue while hallucinating was blank Platform- and/or Interface-Specific Fixes diff --git a/src/pager.c b/src/pager.c index 1dfcf5cd7..9b6192a04 100644 --- a/src/pager.c +++ b/src/pager.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 pager.c $NHDT-Date: 1519529752 2018/02/25 03:35:52 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.120 $ */ +/* NetHack 3.6 pager.c $NHDT-Date: 1523142395 2018/04/07 23:06:35 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.123 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -418,6 +418,9 @@ char *buf, *monbuf; if ((mtmp = m_at(x, y)) != 0) { look_at_monster(buf, monbuf, mtmp, x, y); pm = mtmp->data; + } else if (Hallucination) { + /* 'monster' must actually be a statue */ + Strcpy(buf, rndmonnam((char *) 0)); } } else if (glyph_is_object(glyph)) { look_at_object(buf, x, y, glyph); /* fill in buf[] */