From 5c30cc5890c837e2b62dc29c36b2a319cfd72d44 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 2 Jun 2019 08:15:41 -0400 Subject: [PATCH] elemental_clog() should not destroy the very monster trying to be placed --- doc/fixes36.3 | 2 ++ src/mon.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index bf389167d..82ada4627 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -42,6 +42,8 @@ some improvement to the handling of endgame levels filling up with monsters Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository ------------------------------------------------------------------ +elemental_clog() loop needed to guard against obliteration of the monster + that was trying to be placed curses: sometimes the message window would show a blank line after a prompt diff --git a/src/mon.c b/src/mon.c index 511f80a95..690b67b7c 100644 --- a/src/mon.c +++ b/src/mon.c @@ -2635,7 +2635,7 @@ struct monst *mon; m1 = m2 = m3 = m4 = m5 = zm = (struct monst *) 0; if (!msgmv || (moves - msgmv) > 200L) { if (!msgmv || rn2(2)) - You("feel besieged."); + You_feel("besieged."); msgmv = moves; } /* @@ -2646,7 +2646,7 @@ struct monst *mon; * m5 a pet. */ for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) { - if (DEADMONSTER(mtmp)) + if (DEADMONSTER(mtmp) || mtmp == mon) continue; if (mtmp->mx == 0 && mtmp->my == 0) continue;