From 86fccb4e1a0c8851623898454f54a2b7265f9b87 Mon Sep 17 00:00:00 2001 From: "nethack.rankin" Date: Mon, 20 Aug 2007 00:05:24 +0000 Subject: [PATCH] re-fix #H1371 - dead monster fleeing From a bug report, a monster which died by moving into a trap which was next to the hero standing on Elbereth resulted in "The is killed! The turns to flee!". An earlier change made monflee() return if it's given a dead monster, so the fleeing message is no longer given. This fixes the place where monflee() was inappropriately being called for a dead monster in the reported situation. --- doc/fixes34.4 | 1 + src/monmove.c | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/fixes34.4 b/doc/fixes34.4 index be949c6da..ce887dd85 100644 --- a/doc/fixes34.4 +++ b/doc/fixes34.4 @@ -18,6 +18,7 @@ grammar of messages regarding eating artifacts avoid a message about an invisible monster looking much better player polymorphed as a xorn could not pick up items in pits don't display "turns to flee" message for a mimicing mimic +don't display "turns to flee" message for a monster who has just died dipping acid in a fountain could cause an explosion but not destroy the potion if your blindfold glows and you're not otherwise blinded, you can see it added strsubst() to hacklib diff --git a/src/monmove.c b/src/monmove.c index 7d4b98227..5d237501c 100644 --- a/src/monmove.c +++ b/src/monmove.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)monmove.c 3.5 2007/05/16 */ +/* SCCS Id: @(#)monmove.c 3.5 2007/08/19 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -252,7 +252,7 @@ boolean fleemsg; } STATIC_OVL void -distfleeck(mtmp,inrange,nearby,scared) +distfleeck(mtmp, inrange, nearby, scared) register struct monst *mtmp; int *inrange, *nearby, *scared; { @@ -531,7 +531,8 @@ toofar: } tmp = m_move(mtmp, 0); - distfleeck(mtmp,&inrange,&nearby,&scared); /* recalc */ + if (tmp != 2) + distfleeck(mtmp, &inrange, &nearby, &scared); /* recalc */ switch (tmp) { case 0: /* no movement, but it can still attack you */