From 696858346abc322250dc3bff240e193347392606 Mon Sep 17 00:00:00 2001 From: PatR Date: Wed, 29 Apr 2020 12:43:54 -0700 Subject: [PATCH] failure to hold another object when swallowed If hold_another_object() decides that the object must be droped, drop it into u.ustuck's minvent when swallowed instead of magically through the engulfer direct to the floor. --- doc/fixes37.0 | 4 +++- src/invent.c | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/fixes37.0 b/doc/fixes37.0 index b043ae707..7c9fd4680 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.195 $ $NHDT-Date: 1587503040 2020/04/21 21:04:00 $ +$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.208 $ $NHDT-Date: 1588189422 2020/04/29 19:43:42 $ General Fixes and Modified Features ----------------------------------- @@ -166,6 +166,8 @@ change light radius of stack of candles to square root could get redundate "mon hits other-mon" messages when mon wields an artifact failed untrap while mounted that moved hero onto the trap would leave steed with stale coordinates, triggering warnings if 'sanity_check' is On +when hold_another_object() fails while hero is swallowed, drop the item into + swallower's inventory instead of onto the floor Fixes to 3.7.0-x Problems that Were Exposed Via git Repository diff --git a/src/invent.c b/src/invent.c index 8e2689260..ffcbb7863 100644 --- a/src/invent.c +++ b/src/invent.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 invent.c $NHDT-Date: 1583073990 2020/03/01 14:46:30 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.294 $ */ +/* NetHack 3.7 invent.c $NHDT-Date: 1588189423 2020/04/29 19:43:43 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.297 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Derek S. Ray, 2015. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1071,7 +1071,7 @@ const char *drop_fmt, *drop_arg, *hold_msg; if (drop_fmt) pline(drop_fmt, drop_arg); obj->nomerge = 0; - if (can_reach_floor(TRUE)) { + if (can_reach_floor(TRUE) || u.uswallow) { dropx(obj); } else { freeinv(obj);