]> granicus.if.org Git - nethack/commitdiff
shop bits
authornethack.rankin <nethack.rankin>
Tue, 31 Oct 2006 05:32:07 +0000 (05:32 +0000)
committernethack.rankin <nethack.rankin>
Tue, 31 Oct 2006 05:32:07 +0000 (05:32 +0000)
     Eliminate a couple of minor redundancies; no change in game play.

dropy() - only check about selling object if there is a shop on the level.
pick_obj() - leave it to addinv() clear object's no_charge bit.

src/do.c
src/pickup.c

index de8380b178711a6857bf3f5b268b6929cf127206..3e209ec55366bef5f593d83d8c9688a2b89ce9ad 100644 (file)
--- a/src/do.c
+++ b/src/do.c
@@ -573,7 +573,7 @@ register struct obj *obj;
            place_object(obj, u.ux, u.uy);
            if (obj == uball)
                drop_ball(u.ux,u.uy);
-           else
+           else if (level.flags.has_shop)
                sellobj(obj, u.ux, u.uy);
            stackobj(obj);
            if(Blind && Levitation)
index ae989a2ee14394a23ebe5f01a9bfaa6527422bd7..bb72fbb99148e37960c8a3fc31a43c1cd0aac412 100644 (file)
@@ -1390,8 +1390,6 @@ struct obj *otmp;
            if (!index(u.ushops, *fakeshop))
                remote_burglary(otmp->ox, otmp->oy);
        }
-       if (otmp->no_charge)    /* only applies to objects outside invent */
-           otmp->no_charge = 0;
        newsym(otmp->ox, otmp->oy);
        return addinv(otmp);    /* might merge it with other objects */
 }