From f8c20800c7fe3fb471fcc61a63128a7a15a392c0 Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 9 Jul 2021 06:51:10 -0700 Subject: [PATCH] fix pull request #544 - fire vortex engulf of hero carrying burning objects shouldn't cause those to be extinguished. Ditto when fire vortex or poly'd hero engulfs monsters. Fixes #544 --- doc/fixes37.0 | 3 ++- src/mhitm.c | 8 +++++--- src/mhitu.c | 8 +++++--- src/uhitm.c | 8 +++++--- 4 files changed, 17 insertions(+), 10 deletions(-) diff --git a/doc/fixes37.0 b/doc/fixes37.0 index 0ad957529..0d4b3ece8 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -1,4 +1,4 @@ -NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.585 $ $NHDT-Date: 1625796800 2021/07/09 02:13:20 $ +NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.586 $ $NHDT-Date: 1625838646 2021/07/09 13:50:46 $ General Fixes and Modified Features ----------------------------------- @@ -559,6 +559,7 @@ change getloc fastmove keys in number_pad mode from hardcoded HJKL to the allow using rush/run prefix key in getloc to fastmove the cursor avoid "it" in messages "Wait! There's an it hiding under !" (hero moving) and "It was hidden under !" (unseen monster moving) +don't extinguish burning objects when engulfed by a fire vortex Fixes to 3.7.0-x Problems that Were Exposed Via git Repository diff --git a/src/mhitm.c b/src/mhitm.c index 72ebb10c3..cda45a8f6 100644 --- a/src/mhitm.c +++ b/src/mhitm.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 mhitm.c $NHDT-Date: 1614910020 2021/03/05 02:07:00 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.192 $ */ +/* NetHack 3.7 mhitm.c $NHDT-Date: 1625838646 2021/07/09 13:50:46 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.198 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2011. */ /* NetHack may be freely redistributed. See license for details. */ @@ -744,8 +744,10 @@ gulpmm(register struct monst *magr, register struct monst *mdef, Sprintf(buf, "%s swallows", Monnam(magr)); pline("%s %s.", buf, mon_nam(mdef)); } - for (obj = mdef->minvent; obj; obj = obj->nobj) - (void) snuff_lit(obj); + if (!flaming(magr->data)) { + for (obj = mdef->minvent; obj; obj = obj->nobj) + (void) snuff_lit(obj); + } if (is_vampshifter(mdef) && newcham(mdef, &mons[mdef->cham], FALSE, FALSE)) { diff --git a/src/mhitu.c b/src/mhitu.c index e12add042..1404db76c 100644 --- a/src/mhitu.c +++ b/src/mhitu.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 mhitu.c $NHDT-Date: 1625446012 2021/07/05 00:46:52 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.245 $ */ +/* NetHack 3.7 mhitu.c $NHDT-Date: 1625838648 2021/07/09 13:50:48 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.246 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1181,8 +1181,10 @@ gulpmu(struct monst *mtmp, struct attack *mattk) /* u.uswldtim always set > 1 */ u.uswldtim = (unsigned) ((tim_tmp < 2) ? 2 : tim_tmp); swallowed(1); /* update the map display, shows hero swallowed */ - for (otmp2 = g.invent; otmp2; otmp2 = otmp2->nobj) - (void) snuff_lit(otmp2); + if (!flaming(mtmp->data)) { + for (otmp2 = g.invent; otmp2; otmp2 = otmp2->nobj) + (void) snuff_lit(otmp2); + } } if (mtmp != u.ustuck) diff --git a/src/uhitm.c b/src/uhitm.c index b0f0f5fdf..a0269477e 100644 --- a/src/uhitm.c +++ b/src/uhitm.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 uhitm.c $NHDT-Date: 1625446013 2021/07/05 00:46:53 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.311 $ */ +/* NetHack 3.7 uhitm.c $NHDT-Date: 1625838649 2021/07/09 13:50:49 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.312 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -4223,8 +4223,10 @@ gulpum(struct monst *mdef, struct attack *mattk) return MM_MISS; if (u.uhunger < 1500 && !u.uswallow) { - for (otmp = mdef->minvent; otmp; otmp = otmp->nobj) - (void) snuff_lit(otmp); + if (!flaming(g.youmonst.data)) { + for (otmp = mdef->minvent; otmp; otmp = otmp->nobj) + (void) snuff_lit(otmp); + } /* force vampire in bat, cloud, or wolf form to revert back to vampire form now instead of dealing with that when it dies */ -- 2.50.1