diff --git a/doc/fixes34.2 b/doc/fixes34.2 index ba187712d..7b91ff752 100644 --- a/doc/fixes34.2 +++ b/doc/fixes34.2 @@ -37,6 +37,9 @@ initialize artifacts before processing $WIZKIT clean up inconsistency between various places quaff is documented is_damageable was using is_rottable incorrectly charge for use of an unpaid tinning kit +avoid impossible when water freezes while hero is hiding under water +avoid impossible after eating the object the hero is hiding under +failed attempt to eat floor gold while polymorphed would lose the gold Platform- and/or Interface-Specific Fixes diff --git a/src/eat.c b/src/eat.c index f7ed266c7..03b46b705 100644 --- a/src/eat.c +++ b/src/eat.c @@ -1570,9 +1570,12 @@ eatspecial() /* called after eating non-food */ #ifdef GOLDOBJ if (carried(otmp)) useupall(otmp); - else +#else + if (otmp->where == OBJ_FREE) + dealloc_obj(otmp); #endif - dealloc_obj(otmp); + else + useupf(otmp, otmp->quan); return; } if (otmp->oclass == POTION_CLASS) { @@ -2407,7 +2410,6 @@ floorfood(verb,corpsecheck) /* get food from floor or pack */ Sprintf(qbuf, "There are %ld gold pieces here; eat them?", gold->quan); if ((c = yn_function(qbuf, ynqchars, 'n')) == 'y') { - obj_extract_self(gold); return gold; } else if (c == 'q') { return (struct obj *)0; diff --git a/src/invent.c b/src/invent.c index 64eee6991..cce171291 100644 --- a/src/invent.c +++ b/src/invent.c @@ -2507,6 +2507,7 @@ register struct obj *obj; long numused; { register struct obj *otmp; + boolean at_u = (obj->ox == u.ux && obj->oy == u.uy); /* burn_floor_paper() keeps an object pointer that it tries to * useupf() multiple times, so obj must survive if plural */ @@ -2520,6 +2521,8 @@ long numused; else (void)stolen_value(otmp, otmp->ox, otmp->oy, FALSE, FALSE); } delobj(otmp); + if (at_u && u.uundetected && hides_under(youmonst.data)) + u.uundetected = OBJ_AT(u.ux, u.uy); } #endif /* OVLB */ diff --git a/src/zap.c b/src/zap.c index 23e992f21..e60efcd53 100644 --- a/src/zap.c +++ b/src/zap.c @@ -3601,6 +3601,7 @@ boolean *shopdamage; if (u.uinwater) { /* not just `if (Underwater)' */ /* leave the no longer existent water */ u.uinwater = 0; + u.uundetected = 0; docrt(); vision_full_recalc = 1; } else if (u.utrap && u.utraptype == TT_LAVA) {