fix #H7039 - autodescribe of hallucinated statue

Having the autodescribe feature enabled and moving the cursor onto
a statue yields "statue of a <mon>" 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 "<random mon>" (not "statue of a <random mon>")
instead, same as when moving cursor over glyphs of actual monsters.
This commit is contained in:
PatR
2018-04-07 16:08:10 -07:00
parent 297fb5522e
commit 38df5360e0
2 changed files with 5 additions and 1 deletions

View File

@@ -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[] */