elemental_clog() should not destroy the very monster trying to be placed

This commit is contained in:
nhmall
2019-06-02 08:15:41 -04:00
parent 4e119f4f00
commit 5c30cc5890
2 changed files with 4 additions and 2 deletions
+2
View File
@@ -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 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 curses: sometimes the message window would show a blank line after a prompt
+2 -2
View File
@@ -2635,7 +2635,7 @@ struct monst *mon;
m1 = m2 = m3 = m4 = m5 = zm = (struct monst *) 0; m1 = m2 = m3 = m4 = m5 = zm = (struct monst *) 0;
if (!msgmv || (moves - msgmv) > 200L) { if (!msgmv || (moves - msgmv) > 200L) {
if (!msgmv || rn2(2)) if (!msgmv || rn2(2))
You("feel besieged."); You_feel("besieged.");
msgmv = moves; msgmv = moves;
} }
/* /*
@@ -2646,7 +2646,7 @@ struct monst *mon;
* m5 a pet. * m5 a pet.
*/ */
for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) { for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
if (DEADMONSTER(mtmp)) if (DEADMONSTER(mtmp) || mtmp == mon)
continue; continue;
if (mtmp->mx == 0 && mtmp->my == 0) if (mtmp->mx == 0 && mtmp->my == 0)
continue; continue;