fix #K4201 - bhitpos is clobbered by lookat()
The look-at-screen code was setting bhitpos before calling look_at_monster() but that hasn't been needed for around 25 years. Fix is trivial. However, having such a low level routine as show_glyph() call do_screen_description() seems like a recipe for trouble.
This commit is contained in:
@@ -651,8 +651,6 @@ lookat(coordxy x, coordxy y, char *buf, char *monbuf)
|
|||||||
Sprintf(buf, "interior of %s", mon_nam(u.ustuck));
|
Sprintf(buf, "interior of %s", mon_nam(u.ustuck));
|
||||||
pm = u.ustuck->data;
|
pm = u.ustuck->data;
|
||||||
} else if (glyph_is_monster(glyph)) {
|
} else if (glyph_is_monster(glyph)) {
|
||||||
gb.bhitpos.x = x;
|
|
||||||
gb.bhitpos.y = y;
|
|
||||||
if ((mtmp = m_at(x, y)) != 0) {
|
if ((mtmp = m_at(x, y)) != 0) {
|
||||||
look_at_monster(buf, monbuf, mtmp, x, y);
|
look_at_monster(buf, monbuf, mtmp, x, y);
|
||||||
pm = mtmp->data;
|
pm = mtmp->data;
|
||||||
@@ -1901,8 +1899,6 @@ look_all(
|
|||||||
if (glyph_is_monster(glyph)) {
|
if (glyph_is_monster(glyph)) {
|
||||||
struct monst *mtmp;
|
struct monst *mtmp;
|
||||||
|
|
||||||
gb.bhitpos.x = x; /* [is this actually necessary?] */
|
|
||||||
gb.bhitpos.y = y;
|
|
||||||
if (u_at(x, y) && canspotself()) {
|
if (u_at(x, y) && canspotself()) {
|
||||||
(void) self_lookat(lookbuf);
|
(void) self_lookat(lookbuf);
|
||||||
++count;
|
++count;
|
||||||
|
|||||||
Reference in New Issue
Block a user