]> granicus.if.org Git - nethack/commitdiff
revert part of 4b87e858aa - partly eaten food
authorPatR <rankin@nethack.org>
Fri, 18 Oct 2019 01:55:35 +0000 (18:55 -0700)
committerPatR <rankin@nethack.org>
Fri, 18 Oct 2019 01:55:35 +0000 (18:55 -0700)
Partly eaten globs is seems to be can'o'worms and the hack I just
added to get_pricing_units() made things worse, so back that out.

src/shk.c

index a3a84d64b3c86f171b60dd16bfbc25761c7a3dc0..0cb7e2ab16984785d93a77eae929c6724fda7b89 100644 (file)
--- a/src/shk.c
+++ b/src/shk.c
@@ -1,4 +1,4 @@
-/* NetHack 3.6 shk.c   $NHDT-Date: 1571363148 2019/10/18 01:45:48 $  $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.169 $ */
+/* NetHack 3.6 shk.c   $NHDT-Date: 1571363715 2019/10/18 01:55:15 $  $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.170 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /*-Copyright (c) Robert Patrick Rankin, 2012. */
 /* NetHack may be freely redistributed.  See license for details. */
@@ -2033,9 +2033,7 @@ struct obj *obj;
 {
     long units = obj->quan;
 
-    if (obj->oclass == FOOD_CLASS && obj->oeaten) {
-        units = 0L;
-    } else if (obj->globby) {
+    if (obj->globby) {
         /* globs must be sold by weight not by volume */
         long unit_weight = (long) objects[obj->otyp].oc_weight,
              wt = (obj->owt > 0) ? (long) obj->owt : (long) weight(obj);