-HDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.941 $ $NHDT-Date: 1654717838 2022/06/08 19:50:38 $
+HDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.945 $ $NHDT-Date: 1654886097 2022/06/10 18:34:57 $
General Fixes and Modified Features
-----------------------------------
activating a magic portal still gave "you feel dizzy for a moment, but the
sensation passes" after portal traversal was changed to make the hero
be stunned for a few turns
+after the fix for zombie reviving near hero (which now interrupts hero's
+ occupation), could get "revive panic" when eating a troll corpse if
+ it revived on the same turn that eating the corpse would finish
curses: 'msg_window' option wasn't functional for curses unless the binary
also included tty support
-/* NetHack 3.7 eat.c $NHDT-Date: 1653506421 2022/05/25 19:20:21 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.278 $ */
+/* NetHack 3.7 eat.c $NHDT-Date: 1654886097 2022/06/10 18:34:57 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.281 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2012. */
/* NetHack may be freely redistributed. See license for details. */
return FALSE;
}
+/* called by revive(); sort of the opposite of maybe_finished_meal() */
+void
+cant_finish_meal(struct obj *corpse)
+{
+ /*
+ * When a corpse gets resurrected, the makemon() for that might
+ * call stop_occupation(). If that happens, prevent it from using
+ * up the corpse via maybe_finished_meal() when there's not enough
+ * left for another bite. revive() needs continued access to the
+ * corpse and will delete it when done.
+ */
+ if (g.occupation == eatfood && g.context.victual.piece == corpse) {
+ /* normally performed by done_eating() */
+ g.context.victual.piece = (struct obj *) 0;
+ g.context.victual.o_id = 0;
+ g.context.victual.fullwarn = g.context.victual.eating =
+ g.context.victual.doreset = FALSE;
+
+ if (!corpse->oeaten)
+ corpse->oeaten = 1; /* [see consume_oeaten()] */
+ g.occupation = donull; /* any non-Null other than eatfood() */
+ stop_occupation();
+ newuhs(FALSE);
+ }
+}
+
/* Tin of <something> to the rescue? Decide whether current occupation
is an attempt to eat a tin of something capable of saving hero's life.
We don't care about consumption of non-tinned food here because special
-/* NetHack 3.7 zap.c $NHDT-Date: 1654881021 2022/06/10 17:10:21 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.425 $ */
+/* NetHack 3.7 zap.c $NHDT-Date: 1654886101 2022/06/10 18:35:01 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.426 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2013. */
/* NetHack may be freely redistributed. See license for details. */
impossible("Attempting to revive %s?", xname(corpse));
return (struct monst *) 0;
}
+ /* if this corpse is being eaten, stop doing that; this should be done
+ after makemon() succeeds and skipped if it fails, but waiting until
+ we know the result for that would be too late */
+ cant_finish_meal(corpse);
x = y = 0;
if (corpse->where != OBJ_CONTAINED) {